Skip to content

How to use pqc.js in React Native? #9

@parsaM110

Description

@parsaM110

Title: How to use pqc.js in React Native?

Description:
I'm interested in using pqc.js in a React Native project for post-quantum cryptography operations. However, I'm unsure how to properly integrate it due to React Native's environment differences from standard web/Node.js.

Key questions:

  1. Are there any known compatibility issues with React Native's JavaScript runtime?
  2. How should the WebAssembly files be bundled/loaded in React Native (since RN doesn't use standard webpack)?
  3. Are there any React Native-specific build configurations needed?
  4. For the random generation dependency on libsodium - are there any special considerations for React Native?

Additional context:
From the documentation, I see pqc.js supports:

  • WebAssembly with JS fallback
  • Node.js and browser environments
  • Various KEM and signature algorithms

It would be helpful to have:

  • A React Native example project
  • Documentation on any required polyfills
  • Guidance on handling the WebAssembly file loading in RN

Environment:

  • React Native version: 78
  • Platform: iOS/Android/both

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions