We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80c31a6 commit 30f451eCopy full SHA for 30f451e
packages/secret-contracts-scripts/src/functions/secretpath/encryptPayload.ts
@@ -59,6 +59,8 @@ export async function encryptPayload(
59
nextNonceNum: any,
60
) {
61
62
+ // FIXME: generate a nonce for ChaCha20-Poly1305 encryption. stream cipher encryptions are only secure with a random nonce
63
+ // Reference: https://docs.scrt.network/secret-network-documentation/confidential-computing-layer/ethereum-evm-developer-toolkit/usecases/vrf/using-encrypted-payloads-for-vrf#signing-the-payload-with-metamask
64
let nextNonceUint8Array: Uint8Array = numToUint8Array(nextNonceNum);
65
console.log("nextNonceUint8Array: ", nextNonceUint8Array);
66
console.log("uint8ArrayToNumV2: ", uint8ArrayToNumV2(nextNonceUint8Array));
0 commit comments