Lines Matching +full:has +full:- +full:legacy +full:- +full:mode
97 - EVP cipher routines
232 The following function has been deprecated since OpenSSL 3.0, and can be
238 The following function has been deprecated since OpenSSL 1.1.0, and can be
246 The EVP cipher routines are a high-level interface to certain
286 I<This is a legacy method.> EVP_CIPHER_CTX_set_params() and
290 Performs cipher-specific control actions on context I<ctx>. The control command
343 using legacy functions such as EVP_aes_256_cbc(), but this is not recommended
356 This legacy function is similar to EVP_EncryptInit_ex2() when I<impl> is NULL.
364 case the encryption will be done in-place. However, in-place encryption is
365 guaranteed to work only if the encryption context (I<ctx>) has processed data in
367 from previous operations, in-place encryption will fail.
376 from zero bytes to (inl + cipher_block_size - 1) bytes.
414 for encryption, 0 for decryption and -1 to leave the value unchanged
442 For legacy ciphers - If the cipher doesn't have the flag
445 has that flag set, then I<inl> can be any size.
456 EVP_get_cipherbyname() will return NULL for algorithms such as "AES-128-SIV",
457 "AES-128-CBC-CTS" and "CAMELLIA-128-CBC-CTS" which were previously only
463 Additionally, it only knows about ciphers that are built-in to OpenSSL and have
489 fetched cipher has been assigned to the I<ctx>. It is recommended to use
526 the tag length has not been set.
545 with I<name>, otherwise 0. If I<cipher> is a legacy cipher (it's the return
578 Return the block cipher mode:
592 Built-in ciphers typically use this to track how much of the current underlying block
593 has been "used" already.
653 =item "mode" (B<OSSL_CIPHER_PARAM_MODE>) <unsigned integer>
655 Gets the mode for the associated cipher algorithm I<cipher>.
675 For example AES in CTR mode has a block size of 1 (because it operates like a
676 stream cipher), even though AES has a block size of 16.
685 =item "custom-iv" (B<OSSL_CIPHER_PARAM_CUSTOM_IV>) <integer>
687 Gets 1 if the cipher algorithm I<cipher> has a custom IV, otherwise it gets 0.
702 =item "tls-multi" (B<OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK>) <integer>
710 =item "has-randkey" (B<OSSL_CIPHER_PARAM_HAS_RANDKEY>) <integer>
727 Gets or sets the padding mode for the cipher context I<ctx>.
734 Built-in ciphers typically use this to track how much of the current underlying
735 block has been "used" already.
764 that has the flag B<EVP_CIPH_FLAG_CUSTOM_ASN1> set.
768 Gets or sets the cipher text stealing mode. For all modes the output size is the
772 Valid values for the mode are:
780 using a "AES-XXX-CBC" or "CAMELLIA-XXX-CBC" cipher otherwise the second last
786 using a "AES-XXX-CBC" or "CAMELLIA-XXX-CBC" cipher, otherwise it is the same as
787 "CS3" mode.
794 then this is equivalent to using a "AES-XXX-CBC" or "CAMELLIA-XXX-CBC" cipher.
799 This is only supported for "AES-128-CBC-CTS", "AES-192-CBC-CTS", "AES-256-CBC-CTS",
800 "CAMELLIA-128-CBC-CTS", "CAMELLIA-192-CBC-CTS" and "CAMELLIA-256-CBC-CTS".
826 =item "updated-iv" (B<OSSL_CIPHER_PARAM_UPDATED_IV>) <octet string OR octet ptr>
828 Gets the updated pseudo-IV state for the associated cipher context, e.g.,
829 the previous ciphertext block for CBC mode or the iteratively encrypted IV
830 value for OFB mode. Note that octet pointer access is deprecated and is
843 context I<ctx>. It gets a default value if it has not been set.
857 This is only used for GCM mode.
872 =item "tls-mac" (B<OSSL_CIPHER_PARAM_TLS_MAC>) <octet ptr>
886 Sets the MAC key used by composite AEAD ciphers such as AES-CBC-HMAC-SHA256.
895 =item "use-bits" (B<OSSL_CIPHER_PARAM_USE_BITS>) <unsigned integer>
899 Setting "use-bits" to 1 uses bits. The default is in bytes.
904 =item "tls-version" (B<OSSL_CIPHER_PARAM_TLS_VERSION>) <integer>
908 =item "tls-mac-size" (B<OSSL_CIPHER_PARAM_TLS_MAC_SIZE>) <unsigned integer>
955 This is only used for GCM mode.
981 Bytes 0-7: The sequence number of the first record
983 Byte 9-10: The protocol version
984 Byte 11-12: Input length (Always 0)
1027 with a value of (15 - L)
1126 See L</Settable EVP_CIPHER_CTX parameters> "use-bits".
1130 Used for Legacy purposes only. This flag needed to be set to indicate the
1146 See L</Gettable EVP_CIPHER parameters> "custom-iv".
1154 See L</Gettable EVP_CIPHER parameters> "tls-multi".
1158 See L</Gettable EVP_CIPHER parameters> "has-randkey".
1162 EVP_CIPHER_flags() uses the following flags for legacy purposes only:
1232 cipher's OBJECT IDENTIFIER or NID_undef if it has no defined
1275 depending on the mode specified.
1284 the authentication operation has failed and any output data B<MUST NOT> be used
1298 For GCM AES and OCB AES the default is 12 (i.e. 96 bits). For OCB mode the
1304 This call can only be made when encrypting data and B<after> all data has been
1322 In OCB mode, calling this when encrypting with C<tag> set to C<NULL> sets the
1332 =head2 CCM Mode
1334 The EVP interface for CCM mode is similar to that of the GCM mode but with a
1337 For CCM mode, the total plaintext or ciphertext length B<MUST> be passed to
1342 The following I<ctrl>s are supported in CCM mode.
1352 in data to be decrypted, but as in GCM and OCB mode, it can be set after
1362 nonce value. The nonce length is given by B<15 - L> so it is 7 by default for
1367 =head2 SIV Mode
1369 For SIV mode ciphers the behaviour of the EVP interface is subtly
1382 the authentication operation has failed and any output data B<MUST NOT>
1394 The following ctrls are supported in SIV mode, and are used to get and set
1403 data and B<after> all data has been processed (e.g. after an EVP_EncryptFinal()
1404 call). For SIV mode the taglen must be 16.
1411 calls). For SIV mode the taglen must be 16.
1415 SIV mode makes two passes over the input data, thus, only one call to
1417 with I<out> set to a non-B<NULL> value. A call to EVP_DecryptFinal() or
1421 =head2 ChaCha20-Poly1305
1423 The following I<ctrl>s are supported for the ChaCha20-Poly1305 AEAD algorithm.
1437 This call can only be made when encrypting data and B<after> all data has been
1440 C<taglen> specified here must be 16 (B<POLY1305_BLOCK_SIZE>, i.e. 128-bits) or
1455 preference to the low-level interfaces. This is because the code then becomes
1458 acceleration such as AES-NI (the low-level interfaces do not provide the
1467 When decrypting the final block is checked to see if it has the correct form.
1471 has better than 1 in 256 chance of being of the correct format and problems with
1489 not allow step-by-step initialization of the ctx when the I<key> and I<iv> are
1507 results are unpredictable. This is because it has become standard practice to
1511 The ASN1 code is incomplete (and sometimes inaccurate) it has only been tested
1512 for certain common S/MIME ciphers (RC2, DES, triple DES) in CBC mode.
1556 * Need binary mode for fopen because encrypted data is
1574 openssl idea -d \
1575 -K 000102030405060708090A0B0C0D0E0F -iv 0102030405060708 <filename
1578 with a 128-bit key:
1633 Encryption using AES-CBC with a 256-bit key with "CS1" ciphertext stealing.
1640 * For ciphertext stealing mode the length of the ciphertext "out" will be
1650 cipher = EVP_CIPHER_fetch(NULL, "AES-256-CBC-CTS", NULL);
1665 /* NOTE: CTS mode does not support multiple calls to EVP_CipherUpdate() */
1682 L<provider-cipher(7)>,
1683 L<life_cycle-cipher(7)>
1704 Support for OCB mode was added in OpenSSL 1.1.0.
1730 OpenSSL 3.0, respectively. The old names are kept as non-deprecated
1735 non-deprecated alias macro.
1741 Copyright 2000-2024 The OpenSSL Project Authors. All Rights Reserved.