Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 99) sorted by relevance

1234

/openssh-portable/
H A Dxmss_fast.c60 params->n = n; in xmss_set_params()
98 params->n = n; in xmssmt_set_params()
114 unsigned int n = params->n; in l_tree() local
133 memcpy(wots_pk+(l>>1)*n, wots_pk+(l-1)*n, n); in l_tree()
181 unsigned int n = params->n; in treehash_setup() local
250 int n = params->n; in treehash_update() local
388 int n = params->n; in bds_state_update() local
533 memcpy(pk+n, sk+4+2*n, n); in xmss_keypair()
596 memcpy(hash_key+n, sk+4+3*n, n); in xmss_sign()
762 memcpy(pk+n, sk+params->index_len+2*n, n); in xmssmt_keypair()
[all …]
H A Dxmss_hash.c48 to_byte(buf, type, n); in core_hash_SHA2()
51 buf[i+n] = key[i]; in core_hash_SHA2()
58 if (n == 32) { in core_hash_SHA2()
63 if (n == 64) { in core_hash_SHA2()
84 if (keylen != 3*n){ in h_msg()
98 unsigned char key[n]; in hash_h()
112 prf(bitmask+n, byte_addr, pub_seed, n); in hash_h()
116 return core_hash_SHA2(out, 1, key, n, buf, 2*n, n); in hash_h()
121 unsigned char buf[n]; in hash_f()
122 unsigned char key[n]; in hash_f()
[all …]
H A Daddr.c145 if (n == NULL) in addr_invert()
148 switch (n->af) { in addr_invert()
150 n->v4.s_addr = ~n->v4.s_addr; in addr_invert()
154 n->addr32[i] = ~n->addr32[i]; in addr_invert()
174 memset(n, '\0', sizeof(*n)); in addr_netmask()
177 n->af = AF_INET; in addr_netmask()
183 n->af = AF_INET6; in addr_netmask()
198 if (addr_netmask(af, l, n) == -1 || addr_invert(n) == -1) in addr_hostmask()
319 n) == -1) { in addr_pton()
402 if (n != NULL) in addr_pton_cidr()
[all …]
H A Dbitmap.c72 bitmap_test_bit(struct bitmap *b, u_int n) in bitmap_test_bit() argument
78 return (b->d[n / BITMAP_BITS] >> (n & BITMAP_WMASK)) & 1; in bitmap_test_bit()
82 reserve(struct bitmap *b, u_int n) in reserve() argument
87 if (b->top >= b->len || n > BITMAP_MAX) in reserve()
89 nlen = (n / BITMAP_BITS) + 1; in reserve()
101 bitmap_set_bit(struct bitmap *b, u_int n) in bitmap_set_bit() argument
106 if ((r = reserve(b, n)) != 0) in bitmap_set_bit()
108 offset = n / BITMAP_BITS; in bitmap_set_bit()
126 bitmap_clear_bit(struct bitmap *b, u_int n) in bitmap_clear_bit() argument
130 if (b->top >= b->len || n > BITMAP_MAX) in bitmap_clear_bit()
[all …]
H A Daddr.h46 int addr_netmask(int af, u_int l, struct xaddr *n);
47 int addr_hostmask(int af, u_int l, struct xaddr *n);
48 int addr_invert(struct xaddr *n);
49 int addr_pton(const char *p, struct xaddr *n);
52 int addr_pton_cidr(const char *p, struct xaddr *n, u_int *l);
53 int addr_ntop(const struct xaddr *n, char *p, size_t len);
56 int addr_is_all0s(const struct xaddr *n);
57 int addr_host_is_all0s(const struct xaddr *n, u_int masklen);
H A Dmonitor_fdpass.c65 ssize_t n; in mm_send_fd() local
90 while ((n = sendmsg(sock, &msg, 0)) == -1 && in mm_send_fd()
95 if (n == -1) { in mm_send_fd()
100 if (n != 1) { in mm_send_fd()
101 error_f("sendmsg: expected sent 1 got %zd", n); in mm_send_fd()
124 ssize_t n; in mm_receive_fd() local
145 while ((n = recvmsg(sock, &msg, 0)) == -1 && in mm_receive_fd()
150 if (n == -1) { in mm_receive_fd()
155 if (n != 1) { in mm_receive_fd()
156 error_f("recvmsg: expected received 1 got %zd", n); in mm_receive_fd()
H A Dxmss_wots.c38 wots_set_params(wots_params *params, int n, int w) in wots_set_params() argument
40 params->n = n; in wots_set_params()
43 params->len_1 = (CHAR_BIT * n) / params->log_w; in wots_set_params()
46 params->keysize = params->len * params->n; in wots_set_params()
60 prf((outseeds + (i*params->n)), ctr, inseed, params->n); in expand_seed()
74 for (j = 0; j < params->n; j++) in gen_chain()
79 hash_f(out, out, pub_seed, addr, params->n); in gen_chain()
114 gen_chain(pk+i*params->n, pk+i*params->n, 0, params->w-1, params, pub_seed, addr); in wots_pkgen()
152 gen_chain(sig+i*params->n, sig+i*params->n, 0, basew[i], params, pub_seed, addr); in wots_sign()
187 …gen_chain(pk+i*params->n, sig+i*params->n, basew[i], params->w-1-basew[i], params, pub_seed, addr); in wots_pkFromSig()
H A Dcipher-aesctr.c71 u32 n = 0; in aesctr_encrypt_bytes() local
75 if (n == 0) { in aesctr_encrypt_bytes()
79 *(c++) = *(m++) ^ buf[n]; in aesctr_encrypt_bytes()
80 n = (n + 1) % AES_BLOCK_SIZE; in aesctr_encrypt_bytes()
H A Dauth-pam.c84 # define PAM_MSG_MEMBER(msg, n, member) ((*(msg))[(n)].member) argument
86 # define PAM_MSG_MEMBER(msg, n, member) ((msg)[(n)]->member) argument
336 u_int n, i, num_env; in import_environments() local
345 if (n > INT_MAX) in import_environments()
408 if (n <= 0 || n > PAM_MAX_NUM_MSG) in sshpam_thread_conv()
418 for (i = 0; i < n; ++i) { in sshpam_thread_conv()
462 for(i = 0; i < n; i++) { in sshpam_thread_conv()
631 if (n <= 0 || n > PAM_MAX_NUM_MSG) in sshpam_store_conv()
655 for(i = 0; i < n; i++) { in sshpam_store_conv()
1128 if (n <= 0 || n > PAM_MAX_NUM_MSG || !isatty(STDIN_FILENO)) in sshpam_tty_conv()
[all …]
H A Dxmss_hash.h17 …signed long long inlen, const unsigned char *key, const unsigned int keylen, const unsigned int n);
18 …t, const unsigned char *in, const unsigned char *pub_seed, uint32_t addr[8], const unsigned int n);
19 …t, const unsigned char *in, const unsigned char *pub_seed, uint32_t addr[8], const unsigned int n);
H A Dcipher-ctr.c63 size_t n = 0; in ssh_aes_ctr() local
72 if (n == 0) { in ssh_aes_ctr()
76 *(dest++) = *(src++) ^ buf[n]; in ssh_aes_ctr()
77 n = (n + 1) % AES_BLOCK_SIZE; in ssh_aes_ctr()
/openssh-portable/regress/unittests/bitmap/
H A Dtests.c36 int i, j, k, n; in tests() local
71 for (n = 0; n < NTESTS; n++) { in tests()
72 ASSERT_INT_EQ(BN_is_bit_set(bn, n), in tests()
73 bitmap_test_bit(b, n)); in tests()
90 for (n = len; n < (int)sizeof(bbuf); n++) in tests()
91 ASSERT_U8_EQ(bbuf[n], 0xfc); in tests()
103 for (n = 0; n < NTESTS; n++) { in tests()
105 bitmap_test_bit(b, n)); in tests()
111 for (n = 0; n < NTESTS; n++) { in tests()
127 for (n = 0; n < NTESTS; n++) { in tests()
[all …]
/openssh-portable/openbsd-compat/
H A Dmemmem.c40 uint16_t nw = n[0]<<8 | n[1], hw = h[0]<<8 | h[1]; in twobyte_memmem()
49 uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8; in threebyte_memmem()
59 uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3]; in fourbyte_memmem()
81 const unsigned char *n, size_t l) in twoway_memmem() argument
89 BITOP(byteset, n[i], |=), shift[n[i]] = i+1; in twoway_memmem()
94 if (n[ip+k] == n[jp+k]) { in twoway_memmem()
99 } else if (n[ip+k] > n[jp+k]) { in twoway_memmem()
114 if (n[ip+k] == n[jp+k]) { in twoway_memmem()
119 } else if (n[ip+k] < n[jp+k]) { in twoway_memmem()
132 if (memcmp(n, n+p, ms+1)) { in twoway_memmem()
[all …]
H A Dexplicit_bzero.c21 explicit_bzero(void *p, size_t n) in explicit_bzero() argument
23 (void)explicit_memset(p, 0, n); in explicit_bzero()
29 explicit_bzero(void *p, size_t n) in explicit_bzero() argument
31 if (n == 0) in explicit_bzero()
33 (void)memset_s(p, n, 0, n); in explicit_bzero()
45 explicit_bzero(void *p, size_t n) in explicit_bzero() argument
47 if (n == 0) in explicit_bzero()
56 memset(p, 0, n); in explicit_bzero()
60 ssh_bzero(p, n); in explicit_bzero()
H A Dstrlcat.c39 size_t n = siz; in strlcat() local
43 while (n-- != 0 && *d != '\0') in strlcat()
46 n = siz - dlen; in strlcat()
48 if (n == 0) in strlcat()
51 if (n != 1) { in strlcat()
53 n--; in strlcat()
H A Dkludge-fd_set.c19 void kludge_FD_SET(int n, fd_set *set) { in kludge_FD_SET() argument
20 FD_SET(n, set); in kludge_FD_SET()
22 int kludge_FD_ISSET(int n, fd_set *set) { in kludge_FD_ISSET() argument
23 return FD_ISSET(n, set); in kludge_FD_ISSET()
H A Dstrlcpy.c37 size_t n = siz; in strlcpy() local
40 if (n != 0) { in strlcpy()
41 while (--n != 0) { in strlcpy()
48 if (n == 0) { in strlcpy()
H A Darc4random.c76 _rs_init(u_char *buf, size_t n) in _rs_init() argument
78 if (n < KEYSZ + IVSZ) in _rs_init()
178 _rs_random_buf(void *_buf, size_t n) in _rs_random_buf() argument
183 _rs_stir_if_needed(n); in _rs_random_buf()
184 while (n > 0) { in _rs_random_buf()
186 m = MIN(n, rs_have); in _rs_random_buf()
190 n -= m; in _rs_random_buf()
252 arc4random_buf(void *buf, size_t n) in arc4random_buf() argument
255 _rs_random_buf(buf, n); in arc4random_buf()
264 arc4random_buf(void *_buf, size_t n) in arc4random_buf() argument
[all …]
H A Dtimingsafe_bcmp.c24 timingsafe_bcmp(const void *b1, const void *b2, size_t n) in timingsafe_bcmp() argument
29 for (; n > 0; n--) in timingsafe_bcmp()
/openssh-portable/regress/
H A Drekey.sh30 n=`expr $n - 1`
31 trace "$n rekeying(s)"
32 if [ $n -lt 1 ]; then
80 n=`expr $n - 1`
81 trace "$n rekeying(s)"
82 if [ $n -lt 1 ]; then
96 n=`expr $n - 1`
98 if [ $n -lt 1 ]; then
115 n=`expr $n - 1`
117 if [ $n -lt 1 ]; then
[all …]
H A Dkrl.sh58 for n in 1 2 3 4 10 15 30 50 90 `jot 500 300` 999 1000 1001 1002; do
59 test "x$n" = "x499" && continue
61 echo "id: revoked $n" >> $OBJ/revoked-keyid
80 $SSHKEYGEN -s $OBJ/revoked-ca -z $n -I "revoked $N" $f >/dev/null 2>&1 \
88 for n in $REVOKED_SERIALS ; do
89 f=`keygen $n`
95 for n in $UNREVOKED_SERIALS ; do
96 f=`keygen $n`
200 test_rev "$RKEYS" "revoked keys" y y y n n n n n n
201 test_rev "$UKEYS" "unrevoked keys" n n n n n n n n n
[all …]
H A Dagent-subprocess.sh12 n=12
13 while kill -0 $pid >/dev/null 2>&1 && test "$n" -gt "0"; do
14 n=$(($n - 1))
18 if test "$n" -eq "0"; then
H A Ddynamic-forward.sh21 n=0
25 while [ "$error" -ne 0 -a "$n" -lt 3 ]; do
26 n=`expr $n + 1`
H A Dagent-timeout.sh23 n=`${SSHADD} -l 2> /dev/null | wc -l`
24 trace "agent has $n keys"
25 if [ $n -ne $keys ]; then
26 fail "ssh-add -l did not return $keys keys: $n"
H A Dstderr-data.sh6 for n in '' -n; do
7 verbose "test $tid: ($n)"
8 ${SSH} $n -F $OBJ/ssh_proxy otherhost exec \

1234