boring.go 399 B

123456789101112131415161718
  1. //go:build boringcrypto
  2. package noiseutil
  3. import (
  4. "crypto/boring"
  5. "github.com/flynn/noise"
  6. )
  7. var CipherAESGCM noise.CipherFunc = CipherAESGCMFIPS140
  8. // EncryptLockNeeded indicates if calls to Encrypt need a lock
  9. // This is true for boringcrypto because the Seal function verifies that the
  10. // nonce is strictly increasing.
  11. const EncryptLockNeeded = true
  12. var boringEnabled = boring.Enabled()