Lines Matching refs:cipher
471 * @cipher: The cipher the key is for.
478 enum ocs_cipher cipher)
485 if (cipher == OCS_AES && !(key_size == 32 || key_size == 16)) {
487 "%d-bit keys not supported by AES cipher\n",
492 if (cipher == OCS_SM4 && key_size != 16) {
494 "%d-bit keys not supported for SM4 cipher\n",
525 enum ocs_cipher cipher,
554 val = (cipher << 14) | (mode << 8) | (instruction << 6) |
561 enum ocs_cipher cipher,
571 set_ocs_aes_command(aes_dev, cipher, mode, instruction);
604 enum ocs_cipher cipher, enum ocs_mode mode,
608 /* Ensure cipher, mode and instruction are valid. */
609 if (!(cipher == OCS_AES || cipher == OCS_SM4))
786 * @cipher: The cipher to use (AES or SM4).
798 enum ocs_cipher cipher,
810 NULL, 0, cipher, mode, instruction,
824 ocs_aes_init(aes_dev, mode, cipher, instruction);
912 * @cipher: The Cipher to use (AES or SM4).
926 enum ocs_cipher cipher,
943 aad_size, out_tag, tag_size, cipher,
949 ocs_aes_init(aes_dev, OCS_MODE_GCM, cipher, instruction);
1291 * @cipher: The Cipher to use (AES or SM4).
1308 enum ocs_cipher cipher,
1325 in_tag, tag_size, cipher, OCS_MODE_CCM,
1330 ocs_aes_init(aes_dev, OCS_MODE_CCM, cipher, instruction);