Lines Matching defs:mode
269 int ret, mode;
272 mode = ctx->cipher->flags & EVP_CIPH_MODE;
273 if ((mode == EVP_CIPH_ECB_MODE || mode == EVP_CIPH_CBC_MODE)
277 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
282 if (mode == EVP_CIPH_CBC_MODE)
284 else if (mode == EVP_CIPH_CTR_MODE)
438 # define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \
439 static const EVP_CIPHER aesni_##keylen##_##mode = { \
443 aesni_##mode##_cipher, \
447 static const EVP_CIPHER aes_##keylen##_##mode = { \
452 aes_##mode##_cipher, \
456 const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
457 { return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
459 # define BLOCK_CIPHER_custom(nid,keylen,blocksize,ivlen,mode,MODE,flags) \
460 static const EVP_CIPHER aesni_##keylen##_##mode = { \
461 nid##_##keylen##_##mode,blocksize, \
464 aesni_##mode##_init_key, \
465 aesni_##mode##_cipher, \
466 aes_##mode##_cleanup, \
468 NULL,NULL,aes_##mode##_ctrl,NULL }; \
469 static const EVP_CIPHER aes_##keylen##_##mode = { \
470 nid##_##keylen##_##mode,blocksize, \
473 aes_##mode##_init_key, \
474 aes_##mode##_cipher, \
475 aes_##mode##_cleanup, \
477 NULL,NULL,aes_##mode##_ctrl,NULL }; \
478 const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
479 { return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
549 int ret, mode, bits;
552 mode = ctx->cipher->flags & EVP_CIPH_MODE;
554 if ((mode == EVP_CIPH_ECB_MODE || mode == EVP_CIPH_CBC_MODE)
561 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
565 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
569 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
581 if (mode == EVP_CIPH_CBC_MODE)
583 else if (mode == EVP_CIPH_CTR_MODE)
589 if (mode == EVP_CIPH_CBC_MODE)
591 else if (mode == EVP_CIPH_CTR_MODE)
597 if (mode == EVP_CIPH_CBC_MODE)
599 else if (mode == EVP_CIPH_CTR_MODE)
807 # define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \
808 static const EVP_CIPHER aes_t4_##keylen##_##mode = { \
812 aes_t4_##mode##_cipher, \
816 static const EVP_CIPHER aes_##keylen##_##mode = { \
821 aes_##mode##_cipher, \
825 const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
826 { return SPARC_AES_CAPABLE?&aes_t4_##keylen##_##mode:&aes_##keylen##_##mode; }
828 # define BLOCK_CIPHER_custom(nid,keylen,blocksize,ivlen,mode,MODE,flags) \
829 static const EVP_CIPHER aes_t4_##keylen##_##mode = { \
830 nid##_##keylen##_##mode,blocksize, \
833 aes_t4_##mode##_init_key, \
834 aes_t4_##mode##_cipher, \
835 aes_##mode##_cleanup, \
837 NULL,NULL,aes_##mode##_ctrl,NULL }; \
838 static const EVP_CIPHER aes_##keylen##_##mode = { \
839 nid##_##keylen##_##mode,blocksize, \
842 aes_##mode##_init_key, \
843 aes_##mode##_cipher, \
844 aes_##mode##_cleanup, \
846 NULL,NULL,aes_##mode##_ctrl,NULL }; \
847 const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
848 { return SPARC_AES_CAPABLE?&aes_t4_##keylen##_##mode:&aes_##keylen##_##mode; }
852 # define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \
853 static const EVP_CIPHER aes_##keylen##_##mode = { \
857 aes_##mode##_cipher, \
861 const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
862 { return &aes_##keylen##_##mode; }
864 # define BLOCK_CIPHER_custom(nid,keylen,blocksize,ivlen,mode,MODE,flags) \
865 static const EVP_CIPHER aes_##keylen##_##mode = { \
866 nid##_##keylen##_##mode,blocksize, \
869 aes_##mode##_init_key, \
870 aes_##mode##_cipher, \
871 aes_##mode##_cleanup, \
873 NULL,NULL,aes_##mode##_ctrl,NULL }; \
874 const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
875 { return &aes_##keylen##_##mode; }
923 int ret, mode;
926 mode = ctx->cipher->flags & EVP_CIPH_MODE;
927 if ((mode == EVP_CIPH_ECB_MODE || mode == EVP_CIPH_CBC_MODE)
935 if (mode == EVP_CIPH_CBC_MODE)
941 if (BSAES_CAPABLE && mode == EVP_CIPH_CBC_MODE) {
951 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
958 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
967 if (mode == EVP_CIPH_CBC_MODE)
972 if (mode == EVP_CIPH_CTR_MODE)
980 if (BSAES_CAPABLE && mode == EVP_CIPH_CTR_MODE) {
990 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
997 dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
1000 if (mode == EVP_CIPH_CTR_MODE)