Lines Matching +full:not +full:- +full:used

3  * Copyright (c) 2004-2017, Jouni Malinen <j@w1.fi>
9 * for wpa_supplicant and hostapd. When TLS is not used, internal
10 * implementation of MD5, SHA1, and AES is used and no external libraries are
11 * required. When TLS is enabled (e.g., by enabling EAP-TLS or EAP-PEAP), the
12 * crypto library used by the TLS implementation is expected to be used for
13 * non-TLS needs, too, in order to save space by not implementing these
27 * md4_vector - MD4 hash for data vector
32 * Returns: 0 on success, -1 on failure
37 * md5_vector - MD5 hash for data vector
42 * Returns: 0 on success, -1 on failure
48 * sha1_vector - SHA-1 hash for data vector
53 * Returns: 0 on success, -1 on failure
59 * fips186_2-prf - NIST FIPS Publication 186-2 change notice 1 PRF
64 * Returns: 0 on success, -1 on failure
67 * Publication 186-2 for EAP-SIM. This PRF uses a function that is similar to
68 * SHA-1, but has different message padding.
74 * sha256_vector - SHA256 hash for data vector
79 * Returns: 0 on success, -1 on failure
85 * sha384_vector - SHA384 hash for data vector
90 * Returns: 0 on success, -1 on failure
96 * sha512_vector - SHA512 hash for data vector
101 * Returns: 0 on success, -1 on failure
107 * des_encrypt - Encrypt one block with DES
111 * Returns: 0 on success, -1 on failure
116 * aes_encrypt_init - Initialize AES for encryption
124 * aes_encrypt - Encrypt one AES block
128 * Returns: 0 on success, -1 on failure
133 * aes_encrypt_deinit - Deinitialize AES encryption
139 * aes_decrypt_init - Initialize AES for decryption
147 * aes_decrypt - Decrypt one AES block
151 * Returns: 0 on success, -1 on failure
156 * aes_decrypt_deinit - Deinitialize AES decryption
172 * crypto_hash_init - Initialize hash/HMAC function
174 * @key: Key for keyed hash (e.g., HMAC) or %NULL if not needed
179 * This function is only used with internal TLSv1 implementation
180 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
187 * crypto_hash_update - Add data to hash calculation
192 * This function is only used with internal TLSv1 implementation
193 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
199 * crypto_hash_finish - Complete hash calculation
205 * Returns: 0 on success, -1 if buffer is too small (len set to needed length),
206 * or -2 on other failures (including failed crypto_hash_update() operations)
209 * was used for hash calculation.
211 * This function is only used with internal TLSv1 implementation
212 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
226 * crypto_cipher_init - Initialize block/stream cipher function
234 * This function is only used with internal TLSv1 implementation
235 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
243 * crypto_cipher_encrypt - Cipher encrypt
248 * Returns: 0 on success, -1 on failure
250 * This function is only used with internal TLSv1 implementation
251 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
258 * crypto_cipher_decrypt - Cipher decrypt
263 * Returns: 0 on success, -1 on failure
265 * This function is only used with internal TLSv1 implementation
266 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
273 * crypto_cipher_decrypt - Free cipher context
276 * This function is only used with internal TLSv1 implementation
277 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
287 * crypto_public_key_import - Import an RSA public key
293 * parsing. In that case, crypto_public_key_from_cert() is used to import the
296 * This function is only used with internal TLSv1 implementation
297 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
307 * crypto_private_key_import - Import an RSA private key
310 * @passwd: Key encryption password or %NULL if key is not encrypted
313 * This function is only used with internal TLSv1 implementation
314 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
322 * crypto_public_key_from_cert - Import an RSA public key from a certificate
327 * This function can just return %NULL if the crypto library does not support
328 * X.509 parsing. In that case, internal code will be used to parse the
331 * This function is only used with internal TLSv1 implementation
332 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
339 * crypto_public_key_encrypt_pkcs1_v15 - Public key encryption (PKCS #1 v1.5)
344 * @outlen: Length of output buffer in bytes; set to used length on success
345 * Returns: 0 on success, -1 on failure
347 * This function is only used with internal TLSv1 implementation
348 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
356 * crypto_private_key_decrypt_pkcs1_v15 - Private key decryption (PKCS #1 v1.5)
361 * @outlen: Length of output buffer in bytes; set to used length on success
362 * Returns: 0 on success, -1 on failure
364 * This function is only used with internal TLSv1 implementation
365 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
373 * crypto_private_key_sign_pkcs1 - Sign with private key (PKCS #1)
378 * @outlen: Length of output buffer in bytes; set to used length on success
379 * Returns: 0 on success, -1 on failure
381 * This function is only used with internal TLSv1 implementation
382 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
390 * crypto_public_key_free - Free public key
393 * This function is only used with internal TLSv1 implementation
394 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
400 * crypto_private_key_free - Free private key
403 * This function is only used with internal TLSv1 implementation
404 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
410 * crypto_public_key_decrypt_pkcs1 - Decrypt PKCS #1 signature
416 * Returns: 0 on success, -1 on failure
431 * crypto_global_init - Initialize crypto wrapper
433 * This function is only used with internal TLSv1 implementation
434 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
440 * crypto_global_deinit - Deinitialize crypto wrapper
442 * This function is only used with internal TLSv1 implementation
443 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
449 * crypto_mod_exp - Modular exponentiation of large integers
458 * Returns: 0 on success, -1 on failure
461 * used as the maximum size of modulus buffer. It is set to the used size on
464 * This function is only used with internal TLSv1 implementation
465 * (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need
474 * rc4_skip - XOR RC4 stream to given data with skip-stream-start
480 * Returns: 0 on success, -1 on failure
490 * crypto_get_random - Generate cryptographically strong pseudo-random bytes
493 * Returns: 0 on success, -1 on failure
495 * If the PRNG does not have enough entropy to ensure unpredictable byte
496 * sequence, this functions must return -1.
501 * crypto_pkcs7_get_certificates - Extract X.509 certificates from PKCS#7 data
509 * struct crypto_bignum - bignum
512 * to the used crypto library.
517 * crypto_bignum_init - Allocate memory for bignum
523 * crypto_bignum_init_set - Allocate memory for bignum and set the value
531 * crypto_bignum_init_set - Allocate memory for bignum and set the value (uint)
538 * crypto_bignum_deinit - Free bignum
545 * crypto_bignum_to_bin - Set binary buffer to unsigned bignum
550 * Returns: Number of octets written on success, -1 on failure
556 * crypto_bignum_rand - Create a random number in range of modulus
559 * Returns: 0 on success, -1 on failure
564 * crypto_bignum_add - c = a + b
567 * @c: Bignum; used to store the result of a + b
568 * Returns: 0 on success, -1 on failure
575 * crypto_bignum_mod - c = a % b
578 * @c: Bignum; used to store the result of a % b
579 * Returns: 0 on success, -1 on failure
586 * crypto_bignum_exptmod - Modular exponentiation: d = a^b (mod c)
590 * @d: Bignum; used to store the result of a^b (mod c)
591 * Returns: 0 on success, -1 on failure
599 * crypto_bignum_inverse - Inverse a bignum so that a * c = 1 (mod b)
602 * @c: Bignum; used to store the result
603 * Returns: 0 on success, -1 on failure
610 * crypto_bignum_sub - c = a - b
613 * @c: Bignum; used to store the result of a - b
614 * Returns: 0 on success, -1 on failure
621 * crypto_bignum_div - c = a / b
624 * @c: Bignum; used to store the result of a / b
625 * Returns: 0 on success, -1 on failure
632 * crypto_bignum_addmod - d = a + b (mod c)
636 * @d: Bignum; used to store the result of (a + b) % c
637 * Returns: 0 on success, -1 on failure
645 * crypto_bignum_mulmod - d = a * b (mod c)
649 * @d: Bignum; used to store the result of (a * b) % c
650 * Returns: 0 on success, -1 on failure
658 * crypto_bignum_sqrmod - c = a^2 (mod b)
661 * @c: Bignum; used to store the result of a^2 % b
662 * Returns: 0 on success, -1 on failure
669 * crypto_bignum_rshift - r = a >> n
672 * @r: Bignum; used to store the result of a >> n
673 * Returns: 0 on success, -1 on failure
679 * crypto_bignum_cmp - Compare two bignums
682 * Returns: -1 if a < b, 0 if a == b, or 1 if a > b
688 * crypto_bignum_is_zero - Is the given bignum zero
690 * Returns: 1 if @a is zero or 0 if not
695 * crypto_bignum_is_one - Is the given bignum one
697 * Returns: 1 if @a is one or 0 if not
702 * crypto_bignum_is_odd - Is the given bignum odd
704 * Returns: 1 if @a is odd or 0 if not
709 * crypto_bignum_legendre - Compute the Legendre symbol (a/p)
712 * Returns: Legendre symbol -1,0,1 on success; -2 on calculation failure
718 * struct crypto_ec - Elliptic curve context
721 * to the used crypto library.
726 * struct crypto_ec_point - Elliptic curve point
729 * contents is specific to the used crypto library.
734 * crypto_ec_init - Initialize elliptic curve context
742 * crypto_ec_deinit - Deinitialize elliptic curve context
748 * crypto_ec_prime_len - Get length of the prime in octets
755 * crypto_ec_prime_len_bits - Get length of the prime in bits
762 * crypto_ec_order_len - Get length of the order in octets
769 * crypto_ec_get_prime - Get prime defining an EC group
776 * crypto_ec_get_order - Get order of an EC group
783 * crypto_ec_get_a - Get 'a' coefficient of an EC group's curve
790 * crypto_ec_get_b - Get 'b' coeffiecient of an EC group's curve
797 * crypto_ec_get_generator - Get generator point of the EC group's curve
804 * crypto_ec_point_init - Initialize data for an EC point
811 * crypto_ec_point_deinit - Deinitialize EC point data
818 * crypto_ec_point_x - Copies the x-ordinate point into big number
821 * @x: Big number to set to the copy of x-ordinate
822 * Returns: 0 on success, -1 on failure
828 * crypto_ec_point_to_bin - Write EC point value as binary data
831 * @x: Buffer for writing the binary data for x coordinate or %NULL if not used
832 * @y: Buffer for writing the binary data for y coordinate or %NULL if not used
833 * Returns: 0 on success, -1 on failure
835 * This function can be used to write an EC point as binary data in a format
843 * crypto_ec_point_from_bin - Create EC point from binary data
856 * crypto_ec_point_add - c = a + b
860 * @c: Bignum; used to store the result of a + b
861 * Returns: 0 on success, -1 on failure
868 * crypto_ec_point_mul - res = b * p
872 * @res: EC point; used to store the result of b * p
873 * Returns: 0 on success, -1 on failure
880 * crypto_ec_point_invert - Compute inverse of an EC point
883 * Returns: 0 on success, -1 on failure
888 * crypto_ec_point_compute_y_sqr - Compute y^2 = x^3 + ax + b
898 * crypto_ec_point_is_at_infinity - Check whether EC point is neutral element
902 * 0 if not
908 * crypto_ec_point_is_on_curve - Check whether EC point is on curve
911 * Returns: 1 if the specified EC point is on the curve or 0 if not
917 * crypto_ec_point_cmp - Compare two EC points
921 * Returns: 0 on equal, non-zero otherwise
928 * crypto_ec_point_debug_print - Dump EC point to debug log
938 * struct crypto_ec_key - Elliptic curve key pair
940 * Internal data structure for EC key pair. The contents is specific to the used
946 * struct crypto_ecdh - Elliptic Curve Diffie–Hellman context
948 * Internal data structure for ECDH. The contents is specific to the used
954 * crypto_ecdh_init - Initialize elliptic curve Diffie–Hellman context
963 * crypto_ecdh_init2 - Initialize elliptic curve Diffie–Hellman context with a
974 * crypto_ecdh_get_pubkey - Retrieve public key from ECDH context
977 * or not (compressed form)
983 * crypto_ecdh_set_peerkey - Compute ECDH secret
986 * or not (compressed form)
995 * crypto_ecdh_deinit - Free ECDH context
1001 * crypto_ecdh_prime_len - Get length of the prime in octets
1008 * crypto_ec_key_parse_priv - Initialize EC key pair from ECPrivateKey ASN.1
1016 * crypto_ec_key_set_priv - Initialize EC key pair from raw key data
1026 * crypto_ec_key_parse_pub - Initialize EC key pair from SubjectPublicKeyInfo ASN.1
1034 * crypto_ec_key_set_pub - Initialize an EC public key from EC point coordinates
1048 * crypto_ec_key_set_pub_point - Initialize an EC public key from EC point
1058 * crypto_ec_key_gen - Generate EC key pair
1065 * crypto_ec_key_deinit - Free EC key
1071 * crypto_ec_key_get_subject_public_key - Get SubjectPublicKeyInfo ASN.1 for an EC key
1079 * crypto_ec_key_get_ecprivate_key - Get ECPrivateKey ASN.1 for a EC key
1088 * crypto_ec_key_get_pubkey_point - Get public key point coordinates
1099 * crypto_ec_key_get_public_key - Get EC public key as an EC point
1109 * crypto_ec_key_get_private_key - Get EC private key as a bignum
1119 * crypto_ec_key_sign - Sign a buffer with an EC key
1123 * Returns: Buffer with DER encoding of ASN.1 Ecdsa-Sig-Value or %NULL on failure
1129 * crypto_ec_key_sign_r_s - Sign a buffer with an EC key
1141 * crypto_ec_key_verify_signature - Verify ECDSA signature
1145 * @sig: DER encoding of ASN.1 Ecdsa-Sig-Value
1147 * Returns: 1 if signature is valid, 0 if signature is invalid and -1 on failure
1153 * crypto_ec_key_verify_signature_r_s - Verify signature
1163 * Returns: 1 if signature is valid, 0 if signature is invalid, or -1 on failure
1171 * crypto_ec_key_group - Get IANA group identifier for an EC key
1173 * Returns: IANA group identifier and -1 on failure
1178 * crypto_ec_key_cmp - Compare two EC public keys
1181 * Returns: 0 if public keys are identical, -1 otherwise
1186 * crypto_ec_key_debug_print - Dump EC key to debug log
1194 * struct crypto_csr - Certification Signing Request
1196 * Internal data structure for CSR. The contents is specific to the used
1198 * For now it is assumed that only an EC public key can be used
1203 * enum crypto_csr_name - CSR name type
1214 * enum crypto_csr_attr - CSR attribute
1221 * crypto_csr_init - Initialize empty CSR
1227 * crypto_csr_verify - Initialize CSR from CertificationRequest
1235 * crypto_csr_deinit - Free CSR structure
1241 * crypto_csr_set_ec_public_key - Set public key in CSR
1244 * Returns: 0 on success, -1 on failure
1250 * crypto_csr_set_name - Set name entry in CSR SubjectName
1253 * @name: UTF-8 string to write in the CSR SubjectName
1254 * Returns: 0 on success, -1 on failure
1260 * crypto_csr_set_attribute - Set attribute in CSR
1266 * Returns: 0 on success, -1 on failure
1272 * crypto_csr_get_attribute - Get attribute from CSR
1284 * crypto_csr_sign - Sign CSR and return ASN.1 CertificationRequest
1298 * crypto_rsa_key_read - Read an RSA key
1306 * crypto_rsa_oaep_sha256_encrypt - RSA-OAEP-SHA-256 encryption
1315 * crypto_rsa_oaep_sha256_decrypt - RSA-OAEP-SHA-256 decryption
1324 * crypto_rsa_key_free - Free an RSA key
1357 * hpke_base_seal - HPKE base mode single-shot encrypt
1369 * hpke_base_open - HPKE base mode single-shot decrypt
1382 * crypto_unload - Unload crypto resources