| /netbsd-src/tests/sys/crypto/chacha/ |
| H A D | t_chacha.c | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 31 #include <crypto/chacha/chacha.h> 32 #include <crypto/chacha/chacha_ref.h> 35 #include <crypto/chacha/arch/x86/chacha_sse2.h> 39 #include <crypto/chacha/arch/arm/chacha_neon.h> 42 #include <atf-c.h> 63 atf_tc_fail("Portable C chacha_ref self-test failed"); in ATF_TC_BODY() 77 if ((impl)->ci_probe()) \ 79 (impl)->ci_name); \ [all …]
|
| /netbsd-src/sys/crypto/chacha/ |
| H A D | chacha_impl.c | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 38 #include "chacha.h" 50 node.sysctl_data = __UNCONST(chacha_impl->ci_name); in sysctl_kern_crypto_chacha_selected() 51 node.sysctl_size = strlen(chacha_impl->ci_name) + 1; in sysctl_kern_crypto_chacha_selected() 55 SYSCTL_SETUP(sysctl_kern_crypto_chacha_setup, "sysctl kern.crypto.chacha setup") 64 sysctl_createv(clog, 0, &cnode, &chacha_node, 0, CTLTYPE_NODE, "chacha", 65 SYSCTL_DESCR("ChaCha"), 70 SYSCTL_DESCR("Selected ChaCha implementation"), 81 aprint_error("chacha: self-test failed: %s\n", in chacha_select() [all …]
|
| H A D | chacha_impl.h | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 40 #include <crypto/chacha/chacha.h>
|
| H A D | chacha_ref.c | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 30 * ChaCha pseudorandom function family and stream cipher portable C 33 * Daniel J. Bernstein, `ChaCha, a variant of Salsa20', Workshop 34 * Record of the State of the Art in Stream Ciphers -- SASC 2008. 35 * https://cr.yp.to/papers.html#chacha 39 * the stream cipher, with a 32-bit block counter and 96-bit nonce, is 53 return (u << c) | (u >> (32 - c)); in rol32() 64 const uint8_t chacha_const32[16] = "expand 32-byte k"; 90 for (; nr > 0; nr -= 2) { in chacha_core_ref() [all …]
|
| H A D | chacha.h | 1 /* $NetBSD: chacha.h,v 1.1 2020/07/25 22:46:34 riastradh Exp $ */ 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
| /netbsd-src/crypto/external/bsd/openssh/dist/ |
| H A D | PROTOCOL.chacha20poly1305 | 1 This document describes the chacha20-poly1305@openssh.com authenticated 5 ---------- 12 Poly1305[2], also by Daniel Bernstein, is a one-time Carter-Wegman MAC 13 that computes a 128 bit integrity tag given a message and a single-use 16 The chacha20-poly1305@openssh.com combines these two primitives into an 23 ----------- 25 The chacha20-poly1305@openssh.com offers both encryption and 26 authentication. As such, no separate MAC is required. If the 27 chacha20-poly1305@openssh.com cipher is selected in key exchange, 28 the offered MAC algorithms are ignored and no MAC is required to be [all …]
|
| H A D | cipher-chachapoly.h | 1 /* $NetBSD: cipher-chachapoly.h,v 1.3 2020/05/28 17:05:49 christos Exp $ */ 2 /* $OpenBSD: cipher-chachapoly.h,v 1.5 2020/04/03 04:27:03 djm Exp $ */ 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 23 #include "chacha.h"
|
| H A D | cipher-chachapoly.c | 1 /* $NetBSD: cipher-chachapoly.c,v 1.7 2023/10/25 20:19:57 christos Exp $ */ 2 /* $OpenBSD: cipher-chachapoly.c,v 1.10 2023/07/17 05:26:38 djm Exp $ */ 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 21 __RCSID("$NetBSD: cipher-chachapoly.c,v 1.7 2023/10/25 20:19:57 christos Exp $"); 31 #include "cipher-chachapoly.h" 46 chacha_keysetup(&ctx->main_ctx, key, 256); in chachapoly_new() 47 chacha_keysetup(&ctx->header_ctx, key + 32, 256); in chachapoly_new() 71 const u_char one[8] = { 1, 0, 0, 0, 0, 0, 0, 0 }; /* NB little-endian */ in chachapoly_crypt() 81 chacha_ivsetup(&ctx->main_ctx, seqbuf, NULL); in chachapoly_crypt() 82 chacha_encrypt_bytes(&ctx->main_ctx, in chachapoly_crypt() [all …]
|
| H A D | cipher-chachapoly-libcrypto.c | 1 /* $NetBSD: cipher-chachapoly-libcrypto.c,v 1.3 2023/10/25 20:19:57 christos Exp $ */ 2 /* $OpenBSD: cipher-chachapoly-libcrypto.c,v 1.2 2023/07/17 05:26:38 djm Exp $ */ 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 21 __RCSID("$NetBSD: cipher-chachapoly-libcrypto.c,v 1.3 2023/10/25 20:19:57 christos Exp $"); 33 #include "cipher-chachapoly.h" 48 if ((ctx->main_evp = EVP_CIPHER_CTX_new()) == NULL || in chachapoly_new() 49 (ctx->header_evp = EVP_CIPHER_CTX_new()) == NULL) in chachapoly_new() 51 if (!EVP_CipherInit(ctx->main_evp, EVP_chacha20(), key, NULL, 1)) in chachapoly_new() 53 if (!EVP_CipherInit(ctx->header_evp, EVP_chacha20(), key + 32, NULL, 1)) in chachapoly_new() 55 if (EVP_CIPHER_CTX_iv_length(ctx->header_evp) != 16) in chachapoly_new() [all …]
|
| /netbsd-src/sys/crypto/cprng_fast/ |
| H A D | cprng_fast.c | 3 /*- 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 46 #include <crypto/chacha/chacha.h> 52 /* 128-bit vector unit generates 256 bytes at once */ 90 cprng->epoch = entropy_epoch(); in cprng_fast_init_cpu() 95 cprng->reseed_evcnt = kmem_alloc(sizeof(*cprng->reseed_evcnt), in cprng_fast_get() 97 evcnt_attach_dynamic(cprng->reseed_evcnt, EVCNT_TYPE_MISC, NULL, in cprng_fast_get() 98 ci->ci_cpunam in cprng_fast_get() [all...] |
| /netbsd-src/share/man/man9/ |
| H A D | cprng.9 | 3 .\" Copyright (c) 2011-2015 The NetBSD Foundation, Inc. 21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 62 .Bd -literal 80 applications require higher throughput or lower per-request latency 88 A well-known instance of the strong generator, 90 may be used by any in-kernel caller, but separately seeded instances of 114 .Bl -tag -width abcd 117 This generator currently implements the NIST SP 800-90A Hash_DRBG with 118 SHA-256 as the hash function. 133 and must be no higher than [all …]
|
| /netbsd-src/lib/libc/gen/ |
| H A D | arc4random.3 | 21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 115 .Bl -enum -offset abcd 133 function, no matter how short it is. 145 For any 32-byte string 148 is a function from 16-byte strings to 64-byte strings. 154 uniform distribution on all functions from 16-byte strings to 64-byte 157 The PRNG state is a 32-byt [all...] |
| H A D | arc4random.c | 3 /*- 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 34 * ChaCha20 PRF, with per-thread state. 37 * - An attacker who sees some outputs cannot predict past or future 39 * - An attacker who sees the PRNG state cannot predict past outputs. 40 * - An attacker who sees a child's PRNG state cannot predict past or 45 * (a) the crypto self-test fails, 49 * The crypto self-test, pthread_atfork, and thr_keycreate occur only 87 * For standard ChaCha, use le32dec/le32enc. We don't need that for in __weak_alias() 88 * the purposes of a nondeterministic random number generator - in __weak_alias() [all...] |
| /netbsd-src/crypto/external/bsd/openssl.old/dist/ |
| H A D | appveyor.yml | 2 - Visual Studio 2017 5 - x64 6 - x86 11 - VSVER: 15 14 - shared 15 - plain 16 - minimal 19 - ps: >- 20 Install-Module VSSetup -Scope CurrentUser 21 - ps: >- [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/doc/man7/ |
| H A D | OSSL_PROVIDER-default.pod | 5 OSSL_PROVIDER-default - OpenSSL default provider 14 acting on providers is called and no other provider has been loaded yet. 54 =item SHA1, see L<EVP_MD-SHA1(7)> 56 =item SHA2, see L<EVP_MD-SHA2(7)> 58 =item SHA3, see L<EVP_MD-SHA3(7)> 60 =item KECCAK-KMAC, see L<EVP_MD-KECCAK-KMAC(7)> 62 =item SHAKE, see L<EVP_MD-SHAKE(7)> 64 =item BLAKE2, see L<EVP_MD-BLAKE2(7)> 66 =item SM3, see L<EVP_MD-SM3(7)> 68 =item MD5, see L<EVP_MD-MD5(7)> [all …]
|
| /netbsd-src/external/bsd/unbound/dist/compat/ |
| H A D | arc4random.c | 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 23 * ChaCha based random number generator for OpenBSD. 70 chacha_ctx rs_chacha; /* chacha context for random keystream */ 88 return -1; in fallback_gotdata() 110 if (fd == -1) { in fallback_getentropy_urandom() 121 size_t wanted = len - i; in fallback_getentropy_urandom() 124 if (ret == -1) { in fallback_getentropy_urandom() 139 return -1; in fallback_getentropy_urandom() 152 MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) in _rs_init() 155 if (minherit(rs, sizeof(*rs), MAP_INHERIT_ZERO) == -1) in _rs_init() [all …]
|
| /netbsd-src/sys/crypto/chacha/arch/x86/ |
| H A D | chacha_sse2.h | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 34 #include <crypto/chacha/chacha_impl.h>
|
| H A D | chacha_sse2_impl.c | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 128 return -1; in chacha_probe_sse2() 130 return -1; in chacha_probe_sse2() 134 return -1; in chacha_probe_sse2() 136 return -1; in chacha_probe_sse2() 138 return -1; in chacha_probe_sse2() 145 .ci_name = "x86 SSE2 ChaCha",
|
| /netbsd-src/lib/libedit/ |
| H A D | search.h | 3 /*- 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 48 wchar_t chacha; /* Character we are looking for */ member
|
| H A D | search.c | 3 /*- 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 63 ((el)->el_line.cursor + (((el)->el_map.type == MAP_VI) && \ 64 ((el)->el_map.current == (el)->el_map.alt))) 73 el->el_search.patbuf = el_calloc(EL_BUFSIZ, in search_init() 74 sizeof(*el->el_search.patbuf)); in search_init() 75 if (el->el_search.patbuf == NULL) in search_init() 76 return -1; in search_init() 77 el->el_search.patbuf[0] = L'\0'; in search_init() 78 el->el_search.patlen = 0; in search_init() [all …]
|
| /netbsd-src/sys/crypto/chacha/arch/arm/ |
| H A D | chacha_neon.h | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 34 #include <crypto/chacha/chacha_impl.h>
|
| H A D | chacha_neon_impl.c | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 138 id = &curcpu()->ci_id; in chacha_probe_neon() 145 return -1; in chacha_probe_neon() 147 return -1; in chacha_probe_neon() 149 switch (__SHIFTOUT(id->ac_aa64pfr0, ID_AA64PFR0_EL1_ADVSIMD)) { in chacha_probe_neon() 151 return -1; in chacha_probe_neon() 158 return -1; in chacha_probe_neon() 163 return -1; in chacha_probe_neon() 165 return -1; in chacha_probe_neon() [all …]
|
| H A D | chacha_neon_32.S | 3 /*- 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 36 * ChaCha round, split up so we can interleave the quarterrounds on 40 * Daniel J. Bernstein, `ChaCha, a variant of Salsa20', Workshop 41 * Record of the State of the Art in Stream Ciphers -- SASC 2008. 42 * https://cr.yp.to/papers.html#chacha 57 vld1.8 {\c2-\c3}, [sp, :256] 83 vst1.8 {\c0-\c1}, [sp, :256] /* free c0 and c1 as temps */ 89 vsri.u32 \b0, \c0, #(32 - 12) 90 vsri.u32 \b1, \c1, #(32 - 12) [all …]
|
| /netbsd-src/sys/arch/aarch64/aarch64/ |
| H A D | cpu.c | 19 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 52 #include <crypto/chacha/chacha_impl.h> 53 #include <crypto/chacha/arch/arm/chacha_neon.h> 114 ci->ci_cpuid = id; in cpu_attach() 126 ci->ci_cpl = IPL_HIGH; in cpu_attach() 127 ci->ci_cpuid = id; in cpu_attach() 132 ci->ci_dev = dv; in cpu_attach() 134 ci->ci_index = -1; in cpu_attach() 147 ci->ci_de in cpu_attach() [all...] |
| /netbsd-src/sys/arch/arm/vfp/ |
| H A D | vfp_init.c | 22 * ARE DISCLAIMED. IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY 57 #include <crypto/chacha/arch/arm/chacha_neon.h> 58 #include <crypto/chacha/chacha_impl.h> 69 /* FLDMD <X>, {d0-d15} */ 74 __asm __volatile(".fpu vfp\n vldmia\t%0, {d0-d15}" :: "r" (p) : "memory"); in load_vfpregs_lo() 77 /* FSTMD <X>, {d0-d15} */ 82 __asm __volatile(".fpu vfp\n vstmia\t%0, {d0-d15}" :: "r" (p) : "memory"); in save_vfpregs_lo() 86 /* FLDMD <X>, {d16-d31} */ 91 __asm __volatile(".fpu neon-vfpv4\n vldmia\t%0, {d16-d31}" :: "r" (&p[16]) : "memory"); in load_vfpregs_hi() 94 /* FLDMD <X>, {d16-d31} */ [all …]
|