Lines Matching defs:mode
74 int mode = EVP_CIPHER_mode(cipher);
79 switch (mode) {
119 switch (mode) {
146 FIXED_ONE_BYTE_STRING(env->isolate(), "mode"),
170 if (mode != EVP_CIPH_STREAM_CIPHER &&
377 const int mode = EVP_CIPHER_mode(cipher);
378 if (mode == EVP_CIPH_WRAP_MODE)
416 "crypto.createCipher() is not supported in FIPS mode.");
436 const int mode = EVP_CIPHER_mode(cipher);
437 if (kind_ == kCipher && (mode == EVP_CIPH_CTR_MODE ||
438 mode == EVP_CIPH_GCM_MODE ||
439 mode == EVP_CIPH_CCM_MODE)) {
443 "Use Cipheriv for counter mode of %s",
574 const int mode = EVP_CIPHER_CTX_mode(ctx_.get());
575 if (mode == EVP_CIPH_GCM_MODE) {
603 // TODO(tniessen) Support CCM decryption in FIPS mode
606 if (mode == EVP_CIPH_CCM_MODE && kind_ == kDecipher &&
609 if (mode == EVP_CIPH_CCM_MODE && kind_ == kDecipher && FIPS_mode()) {
612 "CCM encryption not supported in FIPS mode");
627 if (mode == EVP_CIPH_CCM_MODE) {
652 // Check if this cipher operates in an AEAD mode that we support.
692 const int mode = EVP_CIPHER_CTX_mode(cipher->ctx_.get());
694 if (mode == EVP_CIPH_GCM_MODE) {
743 const int mode = EVP_CIPHER_CTX_mode(ctx_.get());
745 // When in CCM mode, we need to set the authentication tag and the plaintext
747 if (mode == EVP_CIPH_CCM_MODE) {
750 "options.plaintextLength required for CCM mode with AAD");
797 const int mode = EVP_CIPHER_CTX_mode(ctx_.get());
799 if (mode == EVP_CIPH_CCM_MODE && !CheckCCMMessageLength(len))
814 if (kind_ == kCipher && mode == EVP_CIPH_WRAP_MODE &&
840 // When in CCM mode, EVP_CipherUpdate will fail if the authentication tag is
842 if (!r && kind_ == kDecipher && mode == EVP_CIPH_CCM_MODE) {
894 const int mode = EVP_CIPHER_CTX_mode(ctx_.get());
913 // In CCM mode, final() only checks whether authentication failed in update().
916 if (kind_ == kDecipher && mode == EVP_CIPH_CCM_MODE) {
934 // In GCM mode, the authentication tag length can be specified in advance,
935 // but defaults to 16 bytes when encrypting. In CCM and OCB mode, it must
938 CHECK(mode == EVP_CIPH_GCM_MODE);