| /OK3568_Linux_fs/external/security/librkcrypto/test/c_mode/ |
| H A D | sm4_cmac.c | 27 …unsigned char plain[SM4_BLOCK_SIZE] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00… in rk_derive_mac_key() 28 …unsigned char Rb[SM4_BLOCK_SIZE] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0… in rk_derive_mac_key() 29 unsigned char c0[SM4_BLOCK_SIZE]; in rk_derive_mac_key() 34 rk_left_shift(SM4_BLOCK_SIZE, c0, k1); in rk_derive_mac_key() 38 rk_left_shift(SM4_BLOCK_SIZE, c0, k1); in rk_derive_mac_key() 39 rk_array_xor(SM4_BLOCK_SIZE, k1, Rb, k1); in rk_derive_mac_key() 44 rk_left_shift(SM4_BLOCK_SIZE, k1, k2); in rk_derive_mac_key() 48 rk_left_shift(SM4_BLOCK_SIZE, k1, k2); in rk_derive_mac_key() 49 rk_array_xor(SM4_BLOCK_SIZE, k2, Rb, k2); in rk_derive_mac_key() 56 unsigned char IVtemp[SM4_BLOCK_SIZE]; in rk_sm4_genarate_cmac() [all …]
|
| H A D | sm4_cts.c | 13 for(n=0; n<SM4_BLOCK_SIZE && n<len; ++n) in rk_crypto_cbc128_encrypt() 15 for(; n<SM4_BLOCK_SIZE; ++n) in rk_crypto_cbc128_encrypt() 19 if (len<=SM4_BLOCK_SIZE) break; in rk_crypto_cbc128_encrypt() 20 len -= SM4_BLOCK_SIZE; in rk_crypto_cbc128_encrypt() 21 in += SM4_BLOCK_SIZE; in rk_crypto_cbc128_encrypt() 22 out += SM4_BLOCK_SIZE; in rk_crypto_cbc128_encrypt() 24 memcpy(ivec,iv,SM4_BLOCK_SIZE); in rk_crypto_cbc128_encrypt() 32 unsigned char tmp_buf[SM4_BLOCK_SIZE]; in rk_crypto_cbc128_decrypt() 38 for(n=0; n<SM4_BLOCK_SIZE && n<len; ++n) { in rk_crypto_cbc128_decrypt() 43 if (len<=SM4_BLOCK_SIZE) { in rk_crypto_cbc128_decrypt() [all …]
|
| H A D | sm4_cbc.c | 13 for(n=0; n<SM4_BLOCK_SIZE && n<len; ++n) in rk_crypto_cbc128_encrypt() 15 for(; n<SM4_BLOCK_SIZE; ++n) in rk_crypto_cbc128_encrypt() 19 if (len<=SM4_BLOCK_SIZE) break; in rk_crypto_cbc128_encrypt() 20 len -= SM4_BLOCK_SIZE; in rk_crypto_cbc128_encrypt() 21 in += SM4_BLOCK_SIZE; in rk_crypto_cbc128_encrypt() 22 out += SM4_BLOCK_SIZE; in rk_crypto_cbc128_encrypt() 24 memcpy(ivec,iv,SM4_BLOCK_SIZE); in rk_crypto_cbc128_encrypt() 32 unsigned char tmp_buf[SM4_BLOCK_SIZE]; in rk_crypto_cbc128_decrypt() 38 for(n=0; n<SM4_BLOCK_SIZE && n<len; ++n) { in rk_crypto_cbc128_decrypt() 43 if (len<=SM4_BLOCK_SIZE) { in rk_crypto_cbc128_decrypt() [all …]
|
| H A D | sm4_ctr.c | 7 unsigned char ivec[SM4_BLOCK_SIZE]; 8 unsigned char ecount[SM4_BLOCK_SIZE]; 15 memset(state->ecount, 0, SM4_BLOCK_SIZE); in rk_init_ctr() 16 memcpy(state->ivec, iv, SM4_BLOCK_SIZE); in rk_init_ctr() 21 unsigned int n=SM4_BLOCK_SIZE; in rk_ctr128_inc() 47 n = (n+1) % SM4_BLOCK_SIZE; in rk_crypto_ctr128_encrypt()
|
| H A D | sm4_ecb.c | 10 for(i=0; i<length/SM4_BLOCK_SIZE; i++){ in rk_crypto_ecb128_encrypt() 11 (*block)(in+i*SM4_BLOCK_SIZE, out+i*SM4_BLOCK_SIZE, ctx); in rk_crypto_ecb128_encrypt() 25 if(length%SM4_BLOCK_SIZE || length == 0) in rk_sm4_ecb_encrypt()
|
| H A D | sm4_cfb.c | 7 size_t len, unsigned char ivec[SM4_BLOCK_SIZE], int *num, in rk_crypto_cfb128_encrypt() argument 22 n = (n+1) % SM4_BLOCK_SIZE; in rk_crypto_cfb128_encrypt() 33 n = (n+1) % SM4_BLOCK_SIZE; in rk_crypto_cfb128_encrypt()
|
| H A D | sm4_ofb.c | 19 n = (n+1) % SM4_BLOCK_SIZE; in rk_crypto_ofb128_encrypt()
|
| /OK3568_Linux_fs/kernel/drivers/crypto/ccree/ |
| H A D | cc_cipher.c | 140 if (IS_ALIGNED(size, SM4_BLOCK_SIZE)) in validate_data_size() 1327 .blocksize = SM4_BLOCK_SIZE, 1334 .ivsize = SM4_BLOCK_SIZE, 1344 .blocksize = SM4_BLOCK_SIZE, 1368 .ivsize = SM4_BLOCK_SIZE, 1378 .blocksize = SM4_BLOCK_SIZE, 1385 .ivsize = SM4_BLOCK_SIZE, 1396 .blocksize = SM4_BLOCK_SIZE, 1403 .ivsize = SM4_BLOCK_SIZE,
|
| /OK3568_Linux_fs/kernel/drivers/crypto/inside-secure/ |
| H A D | safexcel_cipher.c | 3087 if (req->cryptlen & (SM4_BLOCK_SIZE - 1)) in safexcel_sm4_blk_encrypt() 3097 if (req->cryptlen & (SM4_BLOCK_SIZE - 1)) in safexcel_sm4_blk_decrypt() 3132 .cra_blocksize = SM4_BLOCK_SIZE, 3148 ctx->blocksz = SM4_BLOCK_SIZE; in safexcel_skcipher_sm4_cbc_cra_init() 3162 .ivsize = SM4_BLOCK_SIZE, 3170 .cra_blocksize = SM4_BLOCK_SIZE, 3186 ctx->blocksz = SM4_BLOCK_SIZE; in safexcel_skcipher_sm4_ofb_cra_init() 3200 .ivsize = SM4_BLOCK_SIZE, 3224 ctx->blocksz = SM4_BLOCK_SIZE; in safexcel_skcipher_sm4_cfb_cra_init() 3238 .ivsize = SM4_BLOCK_SIZE, [all …]
|
| /OK3568_Linux_fs/kernel/include/crypto/ |
| H A D | sm4.h | 15 #define SM4_BLOCK_SIZE 16 macro
|
| /OK3568_Linux_fs/external/security/librkcrypto/test/include/c_mode/ |
| H A D | sm4_core.h | 13 #define SM4_BLOCK_SIZE 16 macro
|
| /OK3568_Linux_fs/kernel/arch/arm64/crypto/ |
| H A D | sm4-ce-glue.c | 51 .cra_blocksize = SM4_BLOCK_SIZE,
|
| /OK3568_Linux_fs/external/security/librkcrypto/include/ |
| H A D | rkcrypto_common.h | 51 #define SM4_BLOCK_SIZE 16 macro
|
| /OK3568_Linux_fs/u-boot/include/optee_include/ |
| H A D | OpteeClientInterface.h | 61 #define SM4_BLOCK_SIZE 16 macro
|
| /OK3568_Linux_fs/kernel/crypto/ |
| H A D | sm4_generic.c | 210 .cra_blocksize = SM4_BLOCK_SIZE,
|
| /OK3568_Linux_fs/external/security/rk_tee_user/v2/ta/rk_public_api/ |
| H A D | rk_crypto_api.h | 13 #define SM4_BLOCK_SIZE 16 macro
|
| H A D | rk_crypto_api.c | 303 if (len % SM4_BLOCK_SIZE != 0) in rk_cipher_crypto() 306 iv_len = SM4_BLOCK_SIZE; in rk_cipher_crypto() 544 iv_len = SM4_BLOCK_SIZE; in rk_cipher_begin()
|
| /OK3568_Linux_fs/external/security/librkcrypto/test/ |
| H A D | test_cipher.c | 82 .iv_len = SM4_BLOCK_SIZE,
|
| H A D | test_otp_key_crypto.c | 93 .iv_len = SM4_BLOCK_SIZE,
|
| /OK3568_Linux_fs/u-boot/include/rockchip/ |
| H A D | crypto_v2.h | 29 #define SM4_BLOCK_SIZE 16 macro
|
| /OK3568_Linux_fs/external/security/librkcrypto/src/ |
| H A D | rkcrypto_otp_key.c | 57 return SM4_BLOCK_SIZE; in cipher_get_blocksize()
|
| /OK3568_Linux_fs/u-boot/drivers/crypto/rockchip/ |
| H A D | crypto_v2.c | 1158 if (iv_len > SM4_BLOCK_SIZE || key_len != SM4_KEYSIZE) in hw_sm4_init() 1162 if (!iv || iv_len != SM4_BLOCK_SIZE) in hw_sm4_init()
|