API compatibility for golang.org/x/crypto/nacl

73 views
Skip to first unread message

Manlio Perillo

unread,
Apr 20, 2018, 5:09:10 PM4/20/18
to golang-dev
According to https://nacl.cr.yp.to/features.html, the actual cryptographic primitives used by NaCl are not stable.

However this is not true with golang.org/x/crypto/nacl; as an example secretbox
  func Seal(out, message []byte, nonce *[24]byte, key *[32]byte) []byte
will break API compatibility if the nonce or key size is modified in future.

What is the reason why constants like KeyBytes and NonceBytes were not used, instead of literal values like 24 and 32?


Thanks
Manlio Perillo 
Reply all
Reply to author
Forward
0 new messages