boring.go 422 B

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