Lines Matching full:clear
591 struct wpabuf *clear = NULL; in dpp_pkex_build_commit_reveal_req() local
599 clear = wpabuf_alloc(clear_len); in dpp_pkex_build_commit_reveal_req()
606 if (!clear || !msg) in dpp_pkex_build_commit_reveal_req()
616 wpabuf_put_le16(clear, DPP_ATTR_BOOTSTRAP_KEY); in dpp_pkex_build_commit_reveal_req()
617 wpabuf_put_le16(clear, 2 * curve->prime_len); in dpp_pkex_build_commit_reveal_req()
618 if (dpp_test_gen_invalid_key(clear, curve) < 0) in dpp_pkex_build_commit_reveal_req()
625 wpabuf_put_le16(clear, DPP_ATTR_BOOTSTRAP_KEY); in dpp_pkex_build_commit_reveal_req()
626 wpabuf_put_le16(clear, wpabuf_len(A_pub)); in dpp_pkex_build_commit_reveal_req()
627 wpabuf_put_buf(clear, A_pub); in dpp_pkex_build_commit_reveal_req()
637 wpabuf_put_le16(clear, DPP_ATTR_I_AUTH_TAG); in dpp_pkex_build_commit_reveal_req()
638 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req()
639 wpabuf_put_data(clear, u, curve->hash_len - 1); in dpp_pkex_build_commit_reveal_req()
640 wpabuf_put_u8(clear, u[curve->hash_len - 1] ^ 0x01); in dpp_pkex_build_commit_reveal_req()
646 wpabuf_put_le16(clear, DPP_ATTR_I_AUTH_TAG); in dpp_pkex_build_commit_reveal_req()
647 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req()
648 wpabuf_put_data(clear, u, curve->hash_len); in dpp_pkex_build_commit_reveal_req()
667 wpabuf_put_le16(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_pkex_build_commit_reveal_req()
668 wrapped = wpabuf_put(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_pkex_build_commit_reveal_req()
670 wpa_hexdump_buf(MSG_DEBUG, "DPP: AES-SIV cleartext", clear); in dpp_pkex_build_commit_reveal_req()
672 wpabuf_head(clear), wpabuf_len(clear), in dpp_pkex_build_commit_reveal_req()
676 wrapped, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_pkex_build_commit_reveal_req()
687 wpabuf_free(clear); in dpp_pkex_build_commit_reveal_req()
915 struct wpabuf *clear = NULL; in dpp_pkex_build_commit_reveal_resp() local
920 clear = wpabuf_alloc(clear_len); in dpp_pkex_build_commit_reveal_resp()
927 if (!clear || !msg) in dpp_pkex_build_commit_reveal_resp()
937 wpabuf_put_le16(clear, DPP_ATTR_BOOTSTRAP_KEY); in dpp_pkex_build_commit_reveal_resp()
938 wpabuf_put_le16(clear, 2 * curve->prime_len); in dpp_pkex_build_commit_reveal_resp()
939 if (dpp_test_gen_invalid_key(clear, curve) < 0) in dpp_pkex_build_commit_reveal_resp()
946 wpabuf_put_le16(clear, DPP_ATTR_BOOTSTRAP_KEY); in dpp_pkex_build_commit_reveal_resp()
947 wpabuf_put_le16(clear, wpabuf_len(B_pub)); in dpp_pkex_build_commit_reveal_resp()
948 wpabuf_put_buf(clear, B_pub); in dpp_pkex_build_commit_reveal_resp()
958 wpabuf_put_le16(clear, DPP_ATTR_R_AUTH_TAG); in dpp_pkex_build_commit_reveal_resp()
959 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_resp()
960 wpabuf_put_data(clear, v, curve->hash_len - 1); in dpp_pkex_build_commit_reveal_resp()
961 wpabuf_put_u8(clear, v[curve->hash_len - 1] ^ 0x01); in dpp_pkex_build_commit_reveal_resp()
967 wpabuf_put_le16(clear, DPP_ATTR_R_AUTH_TAG); in dpp_pkex_build_commit_reveal_resp()
968 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_resp()
969 wpabuf_put_data(clear, v, curve->hash_len); in dpp_pkex_build_commit_reveal_resp()
988 wpabuf_put_le16(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_pkex_build_commit_reveal_resp()
989 wrapped = wpabuf_put(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_pkex_build_commit_reveal_resp()
991 wpa_hexdump_buf(MSG_DEBUG, "DPP: AES-SIV cleartext", clear); in dpp_pkex_build_commit_reveal_resp()
993 wpabuf_head(clear), wpabuf_len(clear), in dpp_pkex_build_commit_reveal_resp()
997 wrapped, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_pkex_build_commit_reveal_resp()
1008 wpabuf_free(clear); in dpp_pkex_build_commit_reveal_resp()