Lines Matching defs:keylen
1764 unsigned int keylen)
1778 unsigned int keylen)
1792 unsigned int keylen)
1798 keylen = keylen / 2;
1800 switch (keylen) {
1819 unsigned int keylen)
1827 flow_log("skcipher_setkey() keylen: %d\n", keylen);
1828 flow_dump(" key: ", key, keylen);
1832 err = des_setkey(cipher, key, keylen);
1835 err = threedes_setkey(cipher, key, keylen);
1838 err = aes_setkey(cipher, key, keylen);
1847 memcpy(ctx->enckey, key, keylen);
1848 ctx->enckeylen = keylen;
1853 unsigned int xts_keylen = keylen / 2;
2252 unsigned int keylen)
2256 flow_log("%s() ahash:%p key:%p keylen:%u\n",
2257 __func__, ahash, key, keylen);
2258 flow_dump(" key: ", key, keylen);
2261 switch (keylen) {
2279 memcpy(ctx->authkey, key, keylen);
2280 ctx->authkeylen = keylen;
2316 unsigned int keylen)
2325 flow_log("%s() ahash:%p key:%p keylen:%u blksz:%u digestsz:%u\n",
2326 __func__, ahash, key, keylen, blocksize, digestsize);
2327 flow_dump(" key: ", key, keylen);
2329 if (keylen > blocksize) {
2332 rc = do_shash("md5", ctx->authkey, key, keylen, NULL,
2336 rc = do_shash("sha1", ctx->authkey, key, keylen, NULL,
2340 rc = do_shash("sha224", ctx->authkey, key, keylen, NULL,
2344 rc = do_shash("sha256", ctx->authkey, key, keylen, NULL,
2348 rc = do_shash("sha384", ctx->authkey, key, keylen, NULL,
2352 rc = do_shash("sha512", ctx->authkey, key, keylen, NULL,
2356 rc = do_shash("sha3-224", ctx->authkey, key, keylen,
2360 rc = do_shash("sha3-256", ctx->authkey, key, keylen,
2364 rc = do_shash("sha3-384", ctx->authkey, key, keylen,
2368 rc = do_shash("sha3-512", ctx->authkey, key, keylen,
2382 flow_log(" keylen > digestsize... hashed\n");
2385 memcpy(ctx->authkey, key, keylen);
2386 ctx->authkeylen = keylen;
2720 const u8 *key, unsigned int keylen)
2728 flow_log("%s() aead:%p key:%p keylen:%u\n", __func__, cipher, key,
2729 keylen);
2730 flow_dump(" key: ", key, keylen);
2732 ret = crypto_authenc_extractkeys(&keys, key, keylen);
2793 ret = crypto_aead_setkey(ctx->fallback_cipher, key, keylen);
2815 const u8 *key, unsigned int keylen)
2823 flow_log("%s() keylen:%u\n", __func__, keylen);
2824 flow_dump(" key: ", key, keylen);
2827 ctx->digestsize = keylen;
2829 ctx->enckeylen = keylen;
2861 keylen + ctx->salt_len);
2889 * @keylen: Length of key plus salt, in bytes
2897 const u8 *key, unsigned int keylen)
2903 if (keylen < GCM_ESP_SALT_SIZE)
2908 memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
2909 keylen -= GCM_ESP_SALT_SIZE;
2914 return aead_gcm_ccm_setkey(cipher, key, keylen);
2921 * @keylen: Length of key plus salt, in bytes
2929 const u8 *key, unsigned int keylen)
2935 if (keylen < GCM_ESP_SALT_SIZE)
2940 memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
2941 keylen -= GCM_ESP_SALT_SIZE;
2947 return aead_gcm_ccm_setkey(cipher, key, keylen);
2954 * @keylen: Length of key plus salt, in bytes
2962 const u8 *key, unsigned int keylen)
2968 if (keylen < CCM_ESP_SALT_SIZE)
2973 memcpy(ctx->salt, key + keylen - CCM_ESP_SALT_SIZE, CCM_ESP_SALT_SIZE);
2974 keylen -= CCM_ESP_SALT_SIZE;
2978 return aead_gcm_ccm_setkey(cipher, key, keylen);