Lines Matching refs:K
304 uint32_t K[4]; in ossl_sm4_set_key() local
307 K[0] = load_u32_be(key, 0) ^ FK[0]; in ossl_sm4_set_key()
308 K[1] = load_u32_be(key, 1) ^ FK[1]; in ossl_sm4_set_key()
309 K[2] = load_u32_be(key, 2) ^ FK[2]; in ossl_sm4_set_key()
310 K[3] = load_u32_be(key, 3) ^ FK[3]; in ossl_sm4_set_key()
313 K[0] ^= SM4_key_sub(K[1] ^ K[2] ^ K[3] ^ CK[i]); in ossl_sm4_set_key()
314 K[1] ^= SM4_key_sub(K[2] ^ K[3] ^ K[0] ^ CK[i + 1]); in ossl_sm4_set_key()
315 K[2] ^= SM4_key_sub(K[3] ^ K[0] ^ K[1] ^ CK[i + 2]); in ossl_sm4_set_key()
316 K[3] ^= SM4_key_sub(K[0] ^ K[1] ^ K[2] ^ CK[i + 3]); in ossl_sm4_set_key()
317 ks->rk[i ] = K[0]; in ossl_sm4_set_key()
318 ks->rk[i + 1] = K[1]; in ossl_sm4_set_key()
319 ks->rk[i + 2] = K[2]; in ossl_sm4_set_key()
320 ks->rk[i + 3] = K[3]; in ossl_sm4_set_key()