Elixir SDK for Pocketenv
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Clarify nonce derivation to BLAKE2b-24

+1 -1
+1 -1
lib/pocketenv/crypto.ex
··· 4 4 # 5 5 # Algorithm: 6 6 # 1. Generate ephemeral Curve25519 (X25519) keypair via :crypto 7 - # 2. Derive nonce = first 24 bytes of BLAKE2b(eph_pk || recipient_pk) 7 + # 2. Derive nonce = BLAKE2b-24(eph_pk || recipient_pk) — matches libsodium exactly 8 8 # 3. Encrypt with NaCl crypto_box(message, nonce, eph_sk, recipient_pk) [Kcl] 9 9 # 4. Output = eph_pk (32 bytes) || ciphertext 10 10 # 5. Base64url-encode without padding (matches TypeScript sodium implementation)