You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi im moving a program from python to node and im getting leading zeros in my cipher text with node-sodium. Some test data is shown below. Anyone else see the same thing?
pk e7 17 e6 9b 87 a3 ec da c7 09 b0 88 77 f7 5b 94 57 3d b6 92 bd 1e c3 e2 fc b4 2b a7 d7 b6 0d 4b
sk f9 b1 5a 4d de 90 44 93 31 f4 c9 eb b8 ee f3 1d 69 03 23 a9 eb 26 61 28 e3 b6 08 da c1 c0 d7 85
nonce 35 38 64 63 31 66 64 30 63 39 32 66 0 0 0 0 0 0 0 0 0 0 0 0
shared b2 f6 63 de 3d 98 58 8e 91 e7 b3 e5 8c c7 c7 d2 5f cf 06 4f df 7f ad ea 3a da 4e 3f c8 db 3b d8
Hi im moving a program from python to node and im getting leading zeros in my cipher text with node-sodium. Some test data is shown below. Anyone else see the same thing?
pk e7 17 e6 9b 87 a3 ec da c7 09 b0 88 77 f7 5b 94 57 3d b6 92 bd 1e c3 e2 fc b4 2b a7 d7 b6 0d 4b
sk f9 b1 5a 4d de 90 44 93 31 f4 c9 eb b8 ee f3 1d 69 03 23 a9 eb 26 61 28 e3 b6 08 da c1 c0 d7 85
nonce 35 38 64 63 31 66 64 30 63 39 32 66 0 0 0 0 0 0 0 0 0 0 0 0
shared b2 f6 63 de 3d 98 58 8e 91 e7 b3 e5 8c c7 c7 d2 5f cf 06 4f df 7f ad ea 3a da 4e 3f c8 db 3b d8
PlainText
12 34 01 00 00 01 00 00 00 00
00 01 03 77 77 77 03 62 62 63
02 63 6f 02 75 6b 00 00 01 00
01 00 00 29 04 e4 00 00 00 00
00 00 80`
Expected
ae 67 0b 3d c0 78 a3 e5 aa 7b
90 de f7 f5 46 45 a3 4d 27 96
69 11 c7 91 74 44 e5 48 69 2a
f4 38 e2 8c c4 c5 8f 1f f9 e0
5e 8c b0 c0 be 8b 72 ea cd 8c
71 7a cf 66 53 96 fc 98 3c
Got
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 ae 67 0b 3d
c0 78 a3 e5 aa 7b 90 de f7 f5
46 45 a3 4d 27 96 69 11 c7 91
74 44 e5 48 69 2a f4 38 e2 8c ...
Tried both
sodiumApi.crypto_box(plainText, nonce, this.cert.pk, this.sk);
sodiumApi.crypto_box_afternm(plainText, nonce, this.shared)
Windows x64 Node v6.10.1
The text was updated successfully, but these errors were encountered: