keys.go defines three constants:
const aesKeySize = 32 // 256-bit AES
const deriverSecretSize = 32
const hmacKeySize = 32 // SHA-256
These values need to be conveyed by the protocol buffers so that programs outside of the Go codebase can generate keys correctly. The algorithm used depends on this value. For example aesKeySize=32 entails AES256-CTR mode encryption. In this case I think the blockcipher (AES128 or AES256) should be specified in the protocol buffer in some way. In particular change enum CryptoCipherMode to CryptoEncryptionMode and make a new enum CryptoBlockcipher with values AES128 and AES256.
Similarly for HMAC we should specify the hash function. Make a new enum CryptoHash with values SHA256 and SHA1 (although I don't think we use SHA1 anywhere, do we?).
keys.go defines three constants:
These values need to be conveyed by the protocol buffers so that programs outside of the Go codebase can generate keys correctly. The algorithm used depends on this value. For example aesKeySize=32 entails AES256-CTR mode encryption. In this case I think the blockcipher (AES128 or AES256) should be specified in the protocol buffer in some way. In particular change enum CryptoCipherMode to CryptoEncryptionMode and make a new enum CryptoBlockcipher with values AES128 and AES256.
Similarly for HMAC we should specify the hash function. Make a new enum CryptoHash with values SHA256 and SHA1 (although I don't think we use SHA1 anywhere, do we?).