003 File Manager
Current Path:
/usr/src/contrib/wpa/src/crypto
usr
/
src
/
contrib
/
wpa
/
src
/
crypto
/
π
..
π
aes-cbc.c
(1.93 KB)
π
aes-ccm.c
(4.92 KB)
π
aes-ctr.c
(1.64 KB)
π
aes-eax.c
(3.24 KB)
π
aes-encblock.c
(704 B)
π
aes-gcm.c
(6.47 KB)
π
aes-internal-dec.c
(3.64 KB)
π
aes-internal-enc.c
(2.66 KB)
π
aes-internal.c
(41.23 KB)
π
aes-omac1.c
(4.46 KB)
π
aes-siv.c
(4.06 KB)
π
aes-unwrap.c
(1.78 KB)
π
aes-wrap.c
(1.62 KB)
π
aes.h
(548 B)
π
aes_i.h
(4.16 KB)
π
aes_siv.h
(565 B)
π
aes_wrap.h
(2.91 KB)
π
crypto.h
(28.61 KB)
π
crypto_gnutls.c
(11.42 KB)
π
crypto_internal-cipher.c
(5.08 KB)
π
crypto_internal-modexp.c
(2.95 KB)
π
crypto_internal-rsa.c
(2.81 KB)
π
crypto_internal.c
(6.84 KB)
π
crypto_libtomcrypt.c
(15.07 KB)
π
crypto_linux.c
(21.77 KB)
π
crypto_module_tests.c
(61.19 KB)
π
crypto_nettle.c
(9.7 KB)
π
crypto_none.c
(461 B)
π
crypto_openssl.c
(44.34 KB)
π
crypto_wolfssl.c
(33.91 KB)
π
des-internal.c
(14.83 KB)
π
des_i.h
(709 B)
π
dh_group5.c
(806 B)
π
dh_group5.h
(556 B)
π
dh_groups.c
(54.26 KB)
π
dh_groups.h
(692 B)
π
fips_prf_internal.c
(1.37 KB)
π
fips_prf_openssl.c
(2.05 KB)
π
fips_prf_wolfssl.c
(1.75 KB)
π
md4-internal.c
(7.91 KB)
π
md5-internal.c
(8.79 KB)
π
md5.c
(2.64 KB)
π
md5.h
(505 B)
π
md5_i.h
(516 B)
π
milenage.c
(9.5 KB)
π
milenage.h
(1019 B)
π
ms_funcs.c
(16.16 KB)
π
ms_funcs.h
(2.41 KB)
π
random.c
(11.66 KB)
π
random.h
(855 B)
π
rc4.c
(1009 B)
π
sha1-internal.c
(8.93 KB)
π
sha1-pbkdf2.c
(2.34 KB)
π
sha1-prf.c
(1.58 KB)
π
sha1-tlsprf.c
(2.69 KB)
π
sha1-tprf.c
(1.75 KB)
π
sha1.c
(2.69 KB)
π
sha1.h
(1.03 KB)
π
sha1_i.h
(590 B)
π
sha256-internal.c
(6 KB)
π
sha256-kdf.c
(2.08 KB)
π
sha256-prf.c
(2.84 KB)
π
sha256-tlsprf.c
(1.81 KB)
π
sha256.c
(2.64 KB)
π
sha256.h
(1.07 KB)
π
sha256_i.h
(584 B)
π
sha384-internal.c
(2.17 KB)
π
sha384-kdf.c
(2.08 KB)
π
sha384-prf.c
(2.85 KB)
π
sha384.c
(2.63 KB)
π
sha384.h
(949 B)
π
sha384_i.h
(573 B)
π
sha512-internal.c
(7.71 KB)
π
sha512-kdf.c
(2.08 KB)
π
sha512-prf.c
(2.85 KB)
π
sha512.c
(2.63 KB)
π
sha512.h
(949 B)
π
sha512_i.h
(591 B)
π
tls.h
(23.71 KB)
π
tls_gnutls.c
(44.97 KB)
π
tls_internal.c
(18.93 KB)
π
tls_none.c
(3.9 KB)
π
tls_openssl.c
(137.99 KB)
π
tls_openssl.h
(477 B)
π
tls_openssl_ocsp.c
(20.52 KB)
π
tls_wolfssl.c
(51.88 KB)
Editing: sha384-internal.c
/* * SHA-384 hash implementation and interface functions * Copyright (c) 2015, Pali RohΓ‘r <pali.rohar@gmail.com> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #include "includes.h" #include "common.h" #include "sha384_i.h" #include "crypto.h" /** * sha384_vector - SHA384 hash for data vector * @num_elem: Number of elements in the data vector * @addr: Pointers to the data areas * @len: Lengths of the data blocks * @mac: Buffer for the hash * Returns: 0 on success, -1 of failure */ int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { struct sha384_state ctx; size_t i; sha384_init(&ctx); for (i = 0; i < num_elem; i++) if (sha384_process(&ctx, addr[i], len[i])) return -1; if (sha384_done(&ctx, mac)) return -1; return 0; } /* ===== start - public domain SHA384 implementation ===== */ /* This is based on SHA384 implementation in LibTomCrypt that was released into * public domain by Tom St Denis. */ #define CONST64(n) n ## ULL /** Initialize the hash state @param md The hash state you wish to initialize @return CRYPT_OK if successful */ void sha384_init(struct sha384_state *md) { md->curlen = 0; md->length = 0; md->state[0] = CONST64(0xcbbb9d5dc1059ed8); md->state[1] = CONST64(0x629a292a367cd507); md->state[2] = CONST64(0x9159015a3070dd17); md->state[3] = CONST64(0x152fecd8f70e5939); md->state[4] = CONST64(0x67332667ffc00b31); md->state[5] = CONST64(0x8eb44a8768581511); md->state[6] = CONST64(0xdb0c2e0d64f98fa7); md->state[7] = CONST64(0x47b5481dbefa4fa4); } int sha384_process(struct sha384_state *md, const unsigned char *in, unsigned long inlen) { return sha512_process(md, in, inlen); } /** Terminate the hash to get the digest @param md The hash state @param out [out] The destination of the hash (48 bytes) @return CRYPT_OK if successful */ int sha384_done(struct sha384_state *md, unsigned char *out) { unsigned char buf[64]; if (md->curlen >= sizeof(md->buf)) return -1; if (sha512_done(md, buf) != 0) return -1; os_memcpy(out, buf, 48); return 0; } /* ===== end - public domain SHA384 implementation ===== */
Upload File
Create Folder