@umbra-privacy/rn-quick-rescue
v1.0.3
Published
Quick Rescue Cipher for React Native
Downloads
484
Readme
@umbra-privacy/rn-quick-rescue
Rescue cipher in CTR mode for React Native, powered by Nitro Modules.
Status
Experimental — this library is under active development and has not been audited. Use at your own risk. APIs may change without notice.
Features
- Rescue cipher encrypt / decrypt in Counter (CTR) mode
- Field: Curve25519 base field (p = 2^255 - 19)
- Block size: 5 field elements
- Key derivation via RescuePrimeHash (NIST SP 800-56C Option 1)
- Secure random nonce generation
- Async operations for background-thread execution
All field arithmetic runs natively in C++ — no JS BigInt overhead.
Installation
npm install @umbra-privacy/rn-quick-rescueRequires react-native-nitro-modules as a peer dependency.
Usage
import { createCipher, generateNonce } from '@umbra-privacy/rn-quick-rescue'
// Create cipher from a 32-byte shared secret
const cipher = createCipher(sharedSecret)
// Generate a unique nonce (16 bytes)
const nonce = generateNonce()
// Encrypt / decrypt field elements
const ciphertext = await cipher.encrypt(plaintext, nonce)
const decrypted = await cipher.decrypt(ciphertext, nonce)Structure
cpp/— C++ Rescue cipher implementationsrc/specs/— Nitro HybridObject specsnitrogen/— Generated Nitrogen bindingsandroid/— Android build configios/— iOS build config
License
MIT — see LICENSE.
This software is experimental and has not been audited. It is provided as-is, without warranty of any kind. Use in production is permitted, but you do so entirely at your own risk. The authors assume no liability for any damages arising from its use.
