/openthread-latest/third_party/mbedtls/repo/tests/suites/ |
D | test_suite_lmots.function | 6 int check_lmots_private_key_for_leak(unsigned char *sig) 13 TEST_EQUAL(sig[idx], 0x7E); 36 unsigned char sig[MBEDTLS_LMOTS_SIG_LEN(MBEDTLS_LMOTS_SHA256_N32_W8)]; 45 msg->x, msg->len, sig, sizeof(sig), NULL), 0); 46 TEST_EQUAL(mbedtls_lmots_verify(&pub_ctx, msg->x, msg->len, sig, sizeof(sig)), 0); 59 unsigned char sig[MBEDTLS_LMOTS_SIG_LEN(MBEDTLS_LMOTS_SHA256_N32_W8)]; 68 NULL, 0, sig, sizeof(sig), NULL), 0); 69 TEST_EQUAL(mbedtls_lmots_verify(&pub_ctx, NULL, 0, sig, sizeof(sig)), 0); 78 void lmots_verify_test(data_t *msg, data_t *sig, data_t *pub_key, 89 TEST_EQUAL(mbedtls_lmots_verify(&ctx, msg->x, msg->len, sig->x, sig->len), expected_rc); [all …]
|
D | test_suite_lms.function | 16 unsigned char sig[MBEDTLS_LMS_SIG_LEN(MBEDTLS_LMS_SHA256_M32_H10, MBEDTLS_LMOTS_SHA256_N32_W8)]; 32 msg->x, msg->len, sig, sizeof(sig), 35 TEST_EQUAL(mbedtls_lms_verify(&pub_ctx, msg->x, msg->len, sig, 36 sizeof(sig)), 0); 49 unsigned char sig[MBEDTLS_LMS_SIG_LEN(MBEDTLS_LMS_SHA256_M32_H10, MBEDTLS_LMOTS_SHA256_N32_W8)]; 65 NULL, 0, sig, sizeof(sig), 68 TEST_EQUAL(mbedtls_lms_verify(&pub_ctx, NULL, 0, sig, 69 sizeof(sig)), 0); 78 void lms_verify_test(data_t *msg, data_t *sig, data_t *pub_key, 89 TEST_EQUAL(mbedtls_lms_verify(&ctx, msg->x, msg->len, sig->x, sig->len), expected_rc); [all …]
|
D | test_suite_ecdsa.function | 235 unsigned char sig[200]; 243 memset(sig, 0x2a, sizeof(sig)); 253 sig, sizeof(sig), &sig_len, 257 sig, sig_len) == 0); 260 for (i = sig_len; i < sizeof(sig); i++) { 261 TEST_ASSERT(sig[i] == 0x2a); 266 sig, sig_len - 1) != 0); 268 sig, sig_len + 1) != 0); 271 sig[0]++; 273 sig, sig_len) != 0); [all …]
|
D | test_suite_lms.data | 18 # word at the start of the key/sig. We strip these 4 bytes from the signature 58 # "levels" word at the start of the key/sig. We strip these 4 bytes from the 67 # * rm message.bin.sig 69 # * rm message.bin.sig 71 # * cat message.bin.sig | xxd 76 # * echo -n -e "\0\0\0\0" > message.bin.sig; cat sig.bin >> message.bin.sig (restore the 90 # 4-byte "levels" word at the start of the key/sig. We strip these 4 bytes from 100 # * cat message.bin.sig | xxd 104 # * echo -n -e "\0\0\0\0" > message.bin.sig; cat sig.bin >> message.bin.sig (restore the 118 # 4-byte "levels" word at the start of the key/sig. We strip these 4 bytes from [all …]
|
D | test_suite_pk.function | 419 const unsigned char *hash, unsigned char *sig) 425 md_alg, hashlen, hash, sig); 1217 data_t *sig, int ret) 1242 hash->x, hash->len, sig->x, sig->len) == ret); 1259 unsigned char sig[MBEDTLS_ECDSA_MAX_LEN]; 1267 memset(sig, 0, sizeof(sig)); 1279 slen = sizeof(sig); 1283 sig, sizeof(sig), &slen, 1290 TEST_ASSERT(memcmp(sig, sig_check->x, slen) == 0); 1298 hash->x, hash->len, sig, slen, &rs_ctx); [all …]
|
D | test_suite_lmots.data | 37 # sig = ots_private_key.sign(message) 38 # print('lmots_verify_test:"{}":"{}":"{}":0'.format(message.hex(), sig.hex(), ots_public_key.pubkey… 62 #sig = ots_private_key.sign(message) 63 #print('lmots_verify_test:"{}":"{}":"{}":0'.format(message.hex(), sig.hex(), ots_public_key.pubkey.… 85 #sig = ots_private_key.sign(message) 86 #print('lmots_verify_test:"{}":"{}":"{}":0'.format(message.hex(), sig.hex(), ots_public_key.pubkey.…
|
/openthread-latest/third_party/mbedtls/repo/library/ |
D | ecdsa.c | 270 ECDSA_RS_ENTER(sig); in mbedtls_ecdsa_sign_restartable() 273 if (rs_ctx != NULL && rs_ctx->sig != NULL) { in mbedtls_ecdsa_sign_restartable() 275 p_sign_tries = &rs_ctx->sig->sign_tries; in mbedtls_ecdsa_sign_restartable() 276 p_key_tries = &rs_ctx->sig->key_tries; in mbedtls_ecdsa_sign_restartable() 277 pk = &rs_ctx->sig->k; in mbedtls_ecdsa_sign_restartable() 278 pr = &rs_ctx->sig->r; in mbedtls_ecdsa_sign_restartable() 281 if (rs_ctx->sig->state == ecdsa_sig_mul) { in mbedtls_ecdsa_sign_restartable() 284 if (rs_ctx->sig->state == ecdsa_sig_modn) { in mbedtls_ecdsa_sign_restartable() 311 if (rs_ctx != NULL && rs_ctx->sig != NULL) { in mbedtls_ecdsa_sign_restartable() 312 rs_ctx->sig->state = ecdsa_sig_mul; in mbedtls_ecdsa_sign_restartable() [all …]
|
D | pk_wrap.c | 67 const unsigned char *sig, size_t sig_len) in rsa_verify_wrap() argument 114 sig, sig_len); in rsa_verify_wrap() 132 const unsigned char *sig, size_t sig_len) in rsa_verify_wrap() argument 150 hash, sig)) != 0) { in rsa_verify_wrap() 171 unsigned char *sig, size_t sig_size, in mbedtls_pk_psa_rsa_sign_ext() argument 211 sig, sig_size, sig_len); in mbedtls_pk_psa_rsa_sign_ext() 232 unsigned char *sig, size_t sig_size, size_t *sig_len, in rsa_sign_wrap() argument 251 sig, sig_size, sig_len); in rsa_sign_wrap() 256 unsigned char *sig, size_t sig_size, size_t *sig_len, in rsa_sign_wrap() argument 274 hash, sig); in rsa_sign_wrap() [all …]
|
D | pk_wrap.h | 38 const unsigned char *sig, size_t sig_len); 43 unsigned char *sig, size_t sig_size, size_t *sig_len, 51 const unsigned char *sig, size_t sig_len, 57 unsigned char *sig, size_t sig_size, size_t *sig_len, 132 unsigned char *sig, size_t sig_size,
|
D | x509write_csr.c | 133 unsigned char *sig, size_t sig_size, in x509write_csr_der_internal() argument 229 sig, sig_size, &sig_len, in x509write_csr_der_internal() 261 sig, sig_len, pk_alg)); in x509write_csr_der_internal() 290 unsigned char *sig; in mbedtls_x509write_csr_der() local 292 if ((sig = mbedtls_calloc(1, MBEDTLS_PK_SIGNATURE_MAX_SIZE)) == NULL) { in mbedtls_x509write_csr_der() 297 sig, MBEDTLS_PK_SIGNATURE_MAX_SIZE, in mbedtls_x509write_csr_der() 300 mbedtls_free(sig); in mbedtls_x509write_csr_der()
|
D | lms.c | 299 const unsigned char *sig, size_t sig_size) in mbedtls_lms_verify() argument 334 if (MBEDTLS_GET_UINT32_BE(sig, SIG_OTS_SIG_OFFSET + MBEDTLS_LMOTS_SIG_TYPE_OFFSET) in mbedtls_lms_verify() 343 if (MBEDTLS_GET_UINT32_BE(sig, SIG_TYPE_OFFSET(ctx->params.otstype)) in mbedtls_lms_verify() 349 q_leaf_identifier = MBEDTLS_GET_UINT32_BE(sig, SIG_Q_LEAF_ID_OFFSET); in mbedtls_lms_verify() 364 sig + SIG_OTS_SIG_OFFSET, in mbedtls_lms_verify() 388 left_node = sig + SIG_PATH_OFFSET(ctx->params.otstype) + in mbedtls_lms_verify() 393 right_node = sig + SIG_PATH_OFFSET(ctx->params.otstype) + in mbedtls_lms_verify() 690 unsigned int msg_size, unsigned char *sig, size_t sig_size, in mbedtls_lms_sign() argument 734 sig + SIG_OTS_SIG_OFFSET, in mbedtls_lms_sign() 742 MBEDTLS_PUT_UINT32_BE(ctx->params.type, sig, SIG_TYPE_OFFSET(ctx->params.otstype)); in mbedtls_lms_sign() [all …]
|
D | lmots.c | 459 const unsigned char *sig, in mbedtls_lmots_calculate_public_key_candidate() argument 479 sig + MBEDTLS_LMOTS_SIG_C_RANDOM_OFFSET, in mbedtls_lmots_calculate_public_key_candidate() 486 sig + MBEDTLS_LMOTS_SIG_SIGNATURE_OFFSET(params->type), in mbedtls_lmots_calculate_public_key_candidate() 508 const unsigned char *sig, size_t sig_size) in mbedtls_lmots_verify() argument 529 if (MBEDTLS_GET_UINT32_BE(sig, MBEDTLS_LMOTS_SIG_TYPE_OFFSET) != MBEDTLS_LMOTS_SHA256_N32_W8) { in mbedtls_lmots_verify() 534 msg, msg_size, sig, sig_size, in mbedtls_lmots_verify() 689 unsigned char *sig, size_t sig_size, size_t *sig_len) in mbedtls_lmots_sign() argument 736 MBEDTLS_PUT_UINT32_BE(ctx->params.type, sig, MBEDTLS_LMOTS_SIG_TYPE_OFFSET); in mbedtls_lmots_sign() 743 ret = (*mbedtls_lmots_sign_private_key_invalidated_hook)(sig); in mbedtls_lmots_sign() 757 memcpy(sig + MBEDTLS_LMOTS_SIG_C_RANDOM_OFFSET, tmp_c_random, in mbedtls_lmots_sign() [all …]
|
D | lmots.h | 147 const unsigned char *sig, 180 size_t msg_size, const unsigned char *sig, 280 unsigned char *sig, size_t sig_size, size_t *sig_len);
|
D | pk.c | 1045 const unsigned char *sig, size_t sig_len, in mbedtls_pk_verify_restartable() argument 1069 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx); in mbedtls_pk_verify_restartable() 1086 sig, sig_len); in mbedtls_pk_verify_restartable() 1094 const unsigned char *sig, size_t sig_len) in mbedtls_pk_verify() argument 1097 sig, sig_len, NULL); in mbedtls_pk_verify() 1106 const unsigned char *sig, size_t sig_len) in mbedtls_pk_verify_ext() argument 1126 return mbedtls_pk_verify(ctx, md_alg, hash, hash_len, sig, sig_len); in mbedtls_pk_verify_ext() 1191 hash_len, sig, signature_length); in mbedtls_pk_verify_ext() 1214 sig); in mbedtls_pk_verify_ext() 1236 unsigned char *sig, size_t sig_size, size_t *sig_len, in mbedtls_pk_sign_restartable() argument [all …]
|
D | rsa.c | 2118 unsigned char *sig) in rsa_rsassa_pss_sign_no_mode_check() argument 2121 unsigned char *p = sig; in rsa_rsassa_pss_sign_no_mode_check() 2181 memset(sig, 0, olen); in rsa_rsassa_pss_sign_no_mode_check() 2208 ret = mgf_mask(sig + offset, olen - hlen - 1 - offset, p, hlen, hash_id); in rsa_rsassa_pss_sign_no_mode_check() 2214 sig[0] &= 0xFF >> (olen * 8 - msb); in rsa_rsassa_pss_sign_no_mode_check() 2219 return mbedtls_rsa_private(ctx, f_rng, p_rng, sig, sig); in rsa_rsassa_pss_sign_no_mode_check() 2229 unsigned char *sig) in rsa_rsassa_pss_sign() argument 2238 sig); in rsa_rsassa_pss_sign() 2247 unsigned char *sig) in mbedtls_rsa_rsassa_pss_sign_no_mode_check() argument 2250 hashlen, hash, MBEDTLS_RSA_SALT_LEN_ANY, sig); in mbedtls_rsa_rsassa_pss_sign_no_mode_check() [all …]
|
D | x509_internal.h | 35 int mbedtls_x509_get_sig(unsigned char **p, const unsigned char *end, mbedtls_x509_buf *sig); 60 unsigned char *sig, size_t size,
|
/openthread-latest/third_party/mbedtls/repo/programs/pkey/ |
D | ecdsa.c | 88 unsigned char sig[MBEDTLS_ECDSA_MAX_LEN]; in main() local 97 memset(sig, 0, sizeof(sig)); in main() 163 sig, sizeof(sig), &sig_len, in main() 170 dump_buf(" + Signature: ", sig, sig_len); in main() 200 sig, sig_len)) != 0) { in main()
|
/openthread-latest/third_party/mbedtls/repo/include/mbedtls/ |
D | rsa.h | 857 unsigned char *sig); 889 unsigned char *sig); 942 unsigned char *sig); 991 unsigned char *sig); 1024 const unsigned char *sig); 1049 const unsigned char *sig); 1084 const unsigned char *sig); 1126 const unsigned char *sig);
|
D | ecdsa.h | 102 mbedtls_ecdsa_restart_sig_ctx *MBEDTLS_PRIVATE(sig); /*!< ecdsa_sign() sub-context */ 475 unsigned char *sig, size_t sig_size, size_t *slen, 522 unsigned char *sig, size_t sig_size, size_t *slen, 556 const unsigned char *sig, size_t slen); 591 const unsigned char *sig, size_t slen,
|
D | pk.h | 291 const unsigned char *hash, unsigned char *sig); 745 const unsigned char *sig, size_t sig_len); 770 const unsigned char *sig, size_t sig_len, 807 const unsigned char *sig, size_t sig_len); 843 unsigned char *sig, size_t sig_size, size_t *sig_len, 879 unsigned char *sig, size_t sig_size, size_t *sig_len, 915 unsigned char *sig, size_t sig_size, size_t *sig_len,
|
D | lms.h | 322 const unsigned char *sig, size_t sig_size); 432 unsigned int msg_size, unsigned char *sig, size_t sig_size,
|
/openthread-latest/src/posix/platform/ |
D | backtrace.cpp | 147 static void signalCritical(int sig, siginfo_t *info, void *ucontext) in signalCritical() argument 153 otLogCritPlat("*** FATAL ERROR: Caught signal: %d (%s)", sig, strsignal(sig)); in signalCritical() 160 raise(sig); in signalCritical()
|
/openthread-latest/tools/spi-hdlc-adapter/ |
D | spi-hdlc-adapter.c | 225 static void signal_SIGINT(int sig) in signal_SIGINT() argument 234 sCaughtSignal = sig; in signal_SIGINT() 242 (void)sig; in signal_SIGINT() 245 static void signal_SIGTERM(int sig) in signal_SIGTERM() argument 254 sCaughtSignal = sig; in signal_SIGTERM() 262 (void)sig; in signal_SIGTERM() 265 static void signal_SIGHUP(int sig) in signal_SIGHUP() argument 274 sCaughtSignal = sig; in signal_SIGHUP() 281 (void)sig; in signal_SIGHUP() 284 static void signal_dumpstats(int sig) in signal_dumpstats() argument [all …]
|
/openthread-latest/third_party/mbedtls/repo/3rdparty/p256-m/p256-m/ |
D | p256-m.h | 74 int p256_ecdsa_sign(uint8_t sig[64], const uint8_t priv[32], 89 int p256_ecdsa_verify(const uint8_t sig[64], const uint8_t pub[64],
|
/openthread-latest/third_party/tcplp/bsdtcp/ |
D | tcp_input.c | 107 struct tcplp_signals* sig); 439 struct tcplp_signals* sig) in tcp_input() argument 823 sig->accepted_connection = tp; in tcp_input() 954 tcp_do_segment(ip6, th, msg, tp, drop_hdrlen, tlen, iptos, sig); in tcp_input() 989 tcp_do_segment(ip6, th, msg, tp, drop_hdrlen, tlen, iptos, sig); in tcp_input() 1025 struct tcplp_signals* sig) in tcp_do_segment() argument 1285 uint32_t poppedbytes = lbuf_pop(&tp->sendbuf, acked, &sig->links_popped); in tcp_do_segment() 1287 sig->bytes_acked += poppedbytes; in tcp_do_segment() 1433 sig->recvbuf_added = true; in tcp_do_segment() 1611 sig->conn_established = true; in tcp_do_segment() [all …]
|