Home | History | Annotate | Download | only in ec_extra

Lines Matching refs:cbs

75 EC_KEY *EC_KEY_parse_private_key(CBS *cbs, const EC_GROUP *group) {
76 CBS ec_private_key, private_key;
78 if (!CBS_get_asn1(cbs, &ec_private_key, CBS_ASN1_SEQUENCE) ||
94 CBS child;
142 CBS child, public_key;
245 /* is_unsigned_integer returns one if |cbs| is a valid unsigned DER INTEGER and
247 static int is_unsigned_integer(const CBS *cbs) {
248 if (CBS_len(cbs) == 0) {
251 uint8_t byte = CBS_data(cbs)[0];
253 (byte == 0 && CBS_len(cbs) > 1 && (CBS_data(cbs)[1] & 0x80) == 0)) {
263 static int parse_explicit_prime_curve(CBS *in, CBS *out_prime, CBS *out_a,
264 CBS *out_b, CBS *out_base_x,
265 CBS *out_base_y, CBS *out_order) {
268 CBS params, field_id, field_type, curve, base;
315 static int integers_equal(const CBS *a, const uint8_t *b, size_t b_len) {
317 CBS a_copy = *a;
328 EC_GROUP *EC_KEY_parse_curve_name(CBS *cbs) {
329 CBS named_curve;
330 if (!CBS_get_asn1(cbs, &named_curve, CBS_ASN1_OBJECT)) {
372 EC_GROUP *EC_KEY_parse_parameters(CBS *cbs) {
373 if (!CBS_peek_asn1_tag(cbs, CBS_ASN1_SEQUENCE)) {
374 return EC_KEY_parse_curve_name(cbs);
381 CBS prime, a, b, base_x, base_y, order;
382 if (!parse_explicit_prime_curve(cbs, &prime, &a, &b, &base_x, &base_y,
434 CBS cbs;
435 CBS_init(&cbs, *inp, (size_t)len);
436 EC_KEY *ret = EC_KEY_parse_private_key(&cbs, group);
444 *inp = CBS_data(&cbs);
463 CBS cbs;
464 cbs, *inp, (size_t)len);
465 EC_GROUP *group = EC_KEY_parse_parameters(&cbs);
482 *inp = CBS_data(&cbs);