/openbmc/linux/include/uapi/linux/ |
H A D | psp-dbc.h | 24 * struct dbc_user_nonce - Nonce exchange structure (input/output). 26 * 0: no authentication, PSP will return single use nonce. 27 * 1: authentication: PSP will return multi-use nonce. 28 * @nonce: 8 byte value used for future authentication (output). 30 * previous nonce (input). 34 __u8 nonce[DBC_NONCE_SIZE]; member 41 * @signature: 32 byte signature created by software using a previous nonce 54 * using a previous nonce (input) 87 * DBCIOCNONCE - Fetch a nonce from the PSP for authenticating commands. 88 * If a nonce is fetched without authentication it can only [all …]
|
/openbmc/linux/lib/crypto/ |
H A D | chacha20poly1305.c | 36 static void xchacha_init(u32 *chacha_state, const u8 *key, const u8 *nonce) in xchacha_init() argument 42 memcpy(iv + 8, nonce + 16, 8); in xchacha_init() 46 /* Compute the subkey given the original key and first 128 nonce bits */ in xchacha_init() 47 chacha_init(chacha_state, k, nonce); in xchacha_init() 92 const u64 nonce, in chacha20poly1305_encrypt() argument 102 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_encrypt() 114 const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], in xchacha20poly1305_encrypt() 119 xchacha_init(chacha_state, key, nonce); in xchacha20poly1305_encrypt() 170 const u64 nonce, in chacha20poly1305_decrypt() argument 181 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_decrypt() [all …]
|
H A D | poly1305-donna64.c | 111 void poly1305_core_emit(const struct poly1305_state *state, const u32 nonce[4], in poly1305_core_emit() 162 if (likely(nonce)) { in poly1305_core_emit() 163 /* h = (h + nonce) */ in poly1305_core_emit() 164 t0 = ((u64)nonce[1] << 32) | nonce[0]; in poly1305_core_emit() 165 t1 = ((u64)nonce[3] << 32) | nonce[2]; in poly1305_core_emit()
|
H A D | poly1305-donna32.c | 120 void poly1305_core_emit(const struct poly1305_state *state, const u32 nonce[4], in poly1305_core_emit() 188 if (likely(nonce)) { in poly1305_core_emit() 189 /* mac = (h + nonce) % (2^128) */ in poly1305_core_emit() 190 f = (u64)h0 + nonce[0]; in poly1305_core_emit() 192 f = (u64)h1 + nonce[1] + (f >> 32); in poly1305_core_emit() 194 f = (u64)h2 + nonce[2] + (f >> 32); in poly1305_core_emit() 196 f = (u64)h3 + nonce[3] + (f >> 32); in poly1305_core_emit()
|
/openbmc/linux/include/crypto/ |
H A D | chacha20poly1305.h | 20 const u64 nonce, 25 const u8 *ad, const size_t ad_len, const u64 nonce, 30 const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], 35 const size_t ad_len, const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], 40 const u64 nonce, 45 const u64 nonce,
|
H A D | chacha.h | 5 * XChaCha extends ChaCha's nonce to 192 bits, while provably retaining ChaCha's 21 /* 32-bit stream position, then 96-bit nonce (RFC7539 convention) */ 30 /* 192-bit nonce, then 64-bit stream position */
|
/openbmc/linux/net/ceph/ |
H A D | decode.c | 28 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_versioned() 63 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_legacy() 185 sizeof(addr->nonce) + in ceph_encode_entity_addr() 188 ceph_encode_copy(p, &addr->nonce, sizeof(addr->nonce)); in ceph_encode_entity_addr()
|
/openbmc/qemu/hw/usb/ |
H A D | u2f-passthru.c | 52 /* Nonce for broadcast isolation */ 53 uint8_t nonce[NONCE_SIZE]; member 163 const uint8_t nonce[NONCE_SIZE]) in u2f_transaction_get_from_nonce() 169 && memcmp(nonce, key->current_transactions[index].nonce, in u2f_transaction_get_from_nonce() 205 const uint8_t nonce[NONCE_SIZE]) in u2f_transaction_add() 228 /* Nonce */ in u2f_transaction_add() 229 if (nonce != NULL) { in u2f_transaction_add() 230 memcpy(transaction->nonce, nonce, NONCE_SIZE); in u2f_transaction_add() 288 /* Nonce checking for legitimate response */ in u2f_passthru_recv_from_host() 289 if (memcmp(transaction->nonce, packet_init->data, NONCE_SIZE) in u2f_passthru_recv_from_host()
|
/openbmc/linux/include/net/ |
H A D | amt.h | 117 __be32 nonce; member 132 __be32 nonce; member 152 __be32 nonce; member 173 __be32 nonce; member 190 __be32 nonce; member 249 __be32 nonce; member 356 __be32 nonce; member
|
/openbmc/linux/tools/crypto/ccp/ |
H A D | dbc_cli.py | 46 choices=["get-nonce", "get-param", "set-param", "set-uid"], 96 if args.command == "get-nonce": 98 nonce = get_nonce(d, sig) 99 print("Nonce: %s" % _pretty_buffer(bytes(nonce)))
|
H A D | test_dbc.py | 59 """fetch unauthenticated nonce""" 81 # 0x1 (get nonce), and invalid data 131 """fetch unauthenticated nonce""" 135 """ensure state machine always returns nonce""" 140 """fetch authenticated nonce"""
|
/openbmc/linux/net/dccp/ |
H A D | ackvec.h | 62 * @av_buf_nonce: ECN nonce sums, each covering subsequent segments of up to 122 * @nonce: whether @vec had an ECN nonce of 0 or 1 130 nonce:1; member 134 int dccp_ackvec_parsed_add(struct list_head *head, u8 *vec, u8 len, u8 nonce);
|
/openbmc/linux/fs/crypto/ |
H A D | policy.c | 112 if (mode->ivsize < offsetofend(union fscrypt_iv, nonce)) { in supported_direct_key_modes() 293 * @nonce: nonce to use 296 * encryption policy. @nonce must be a new random nonce. 302 const u8 nonce[FSCRYPT_FILE_NONCE_SIZE]) in fscrypt_new_context() 320 memcpy(ctx->nonce, nonce, FSCRYPT_FILE_NONCE_SIZE); in fscrypt_new_context() 336 memcpy(ctx->nonce, nonce, FSCRYPT_FILE_NONCE_SIZE); in fscrypt_new_context() 432 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; in set_encryption_policy() local 470 get_random_bytes(nonce, FSCRYPT_FILE_NONCE_SIZE); in set_encryption_policy() 471 ctxsize = fscrypt_new_context(&ctx, policy, nonce); in set_encryption_policy() 592 /* FS_IOC_GET_ENCRYPTION_NONCE: retrieve file's encryption nonce for testing */ [all …]
|
H A D | fscrypt_private.h | 42 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; member 52 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; member 61 * and key with which the file is encrypted. It also contains a nonce that was 95 /* Retrieve the context's nonce, assuming the context was already validated */ 100 return ctx->v1.nonce; in fscrypt_context_nonce() 102 return ctx->v2.nonce; in fscrypt_context_nonce() 253 /* This inode's nonce, copied from the fscrypt_context */ 289 /* per-file nonce; only set in DIRECT_KEY mode */ 290 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; member
|
/openbmc/linux/security/keys/trusted-keys/ |
H A D | trusted_tpm2.c | 206 * @nonce: the session nonce, may be NULL if not used 207 * @nonce_len: the session nonce length, may be 0 if not used 213 const u8 *nonce, u16 nonce_len, in tpm2_buf_append_auth() argument 221 if (nonce && nonce_len) in tpm2_buf_append_auth() 222 tpm_buf_append(buf, nonce, nonce_len); in tpm2_buf_append_auth() 276 NULL /* nonce */, 0, in tpm2_seal_trusted() 431 NULL /* nonce */, 0, in tpm2_load_cmd() 489 NULL /* nonce */, 0, in tpm2_unseal_cmd()
|
/openbmc/linux/drivers/crypto/caam/ |
H A D | caamalg_desc.h | 20 /* Note: Nonce is counted in cdata.keylen */ 60 u32 *nonce, const u32 ctx1_iv_off, 66 const bool is_rfc3686, u32 *nonce, 72 u32 *nonce, const u32 ctx1_iv_off,
|
H A D | caamalg_desc.c | 213 const bool is_rfc3686, u32 *nonce, int era) in init_sh_desc_key_aead() argument 227 * | key = {AUTH_KEY, ENC_KEY, NONCE} in init_sh_desc_key_aead() 228 * | enckeylen = encryption key size + nonce size in init_sh_desc_key_aead() 255 append_load_as_imm(desc, nonce, CTR_RFC3686_NONCE_SIZE, in init_sh_desc_key_aead() 283 * @nonce: pointer to rfc3686 nonce 291 u32 *nonce, const u32 ctx1_iv_off, const bool is_qi, in cnstr_shdsc_aead_encap() argument 295 init_sh_desc_key_aead(desc, cdata, adata, is_rfc3686, nonce, era); in cnstr_shdsc_aead_encap() 378 * @nonce: pointer to rfc3686 nonce 386 const bool is_rfc3686, u32 *nonce, in cnstr_shdsc_aead_decap() argument 390 init_sh_desc_key_aead(desc, cdata, adata, is_rfc3686, nonce, era); in cnstr_shdsc_aead_decap() [all …]
|
/openbmc/linux/drivers/crypto/nx/ |
H A D | nx-aes-gcm.c | 67 char *nonce = nx_ctx->priv.gcm.nonce; in gcm4106_aes_nx_set_key() local 79 memcpy(nonce, in_key + key_len, 4); in gcm4106_aes_nx_set_key() 442 char *nonce = nx_ctx->priv.gcm.nonce; in gcm4106_aes_nx_encrypt() local 444 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_encrypt() 459 char *nonce = nx_ctx->priv.gcm.nonce; in gcm4106_aes_nx_decrypt() local 461 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_decrypt()
|
H A D | nx.h | 92 u8 nonce[NX_GCM4106_NONCE_LEN]; member 106 u8 nonce[NX_CCM4309_NONCE_LEN]; member 114 u8 nonce[CTR_RFC3686_NONCE_SIZE]; member
|
/openbmc/linux/crypto/ |
H A D | vmac.c | 71 } nonce; member 72 unsigned int nonce_size; /* nonce bytes filled so far */ 498 /* Nonce is passed as first VMAC_NONCEBYTES bytes of data */ in vmac_update() 501 memcpy(&dctx->nonce.bytes[dctx->nonce_size], p, n); in vmac_update() 573 * The VMAC specification requires a nonce at least 1 bit shorter than in vmac_final() 575 * nonce. We define the unused bit to be the first one and require that in vmac_final() 578 if (dctx->nonce.bytes[0] & 0x80) in vmac_final() 584 /* Generate pseudorandom pad by encrypting the nonce */ in vmac_final() 586 index = dctx->nonce.bytes[VMAC_NONCEBYTES - 1] & 1; in vmac_final() 587 dctx->nonce.bytes[VMAC_NONCEBYTES - 1] &= ~1; in vmac_final() [all …]
|
/openbmc/linux/include/crypto/internal/ |
H A D | poly1305.h | 16 * full blocks, or 0 for the final block if it had to be padded. If 'nonce' is 31 void poly1305_core_emit(const struct poly1305_state *state, const u32 nonce[4],
|
/openbmc/u-boot/lib/ |
H A D | tpm-v2.c | 777 tpm_u16(0), /* Size of <nonce> */ in tpm2_clear() 778 /* <nonce> (if any) */ in tpm2_clear() 869 tpm_u16(0), /* Size of <nonce> */ in tpm2_pcr_extend() 870 /* <nonce> (if any) */ in tpm2_pcr_extend() 911 tpm_u16(0), /* Size of <nonce> */ in tpm2_nv_read_value() 912 /* <nonce> (if any) */ in tpm2_nv_read_value() 959 tpm_u16(0), /* Size of <nonce> */ in tpm2_nv_write_value() 960 /* <nonce> (if any) */ in tpm2_nv_write_value() 1197 tpm_u16(0), /* Size of <nonce> */ in tpm2_dam_reset() 1198 /* <nonce> (if any) */ in tpm2_dam_reset() [all …]
|
/openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/Attestation/ |
H A D | MeasurementSet.interface.yaml | 8 given nonce and measurements of the SPDM Responder. 17 - name: Nonce
|
/openbmc/linux/arch/x86/crypto/ |
H A D | poly1305_glue.c | 23 const u32 nonce[4]); 25 const u32 nonce[4]); 124 const u32 nonce[4]) in poly1305_simd_emit() 127 poly1305_emit_x86_64(ctx, mac, nonce); in poly1305_simd_emit() 129 poly1305_emit_avx(ctx, mac, nonce); in poly1305_simd_emit()
|
/openbmc/linux/drivers/gpu/drm/radeon/ |
H A D | vce_v1_0.c | 47 uint32_t nonce[4]; member 190 data[0] = sign->val[i].nonce[0]; in vce_v1_0_load_fw() 191 data[1] = sign->val[i].nonce[1]; in vce_v1_0_load_fw() 192 data[2] = sign->val[i].nonce[2]; in vce_v1_0_load_fw() 193 data[3] = sign->val[i].nonce[3]; in vce_v1_0_load_fw()
|