|
| | FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
| | FILE_SECBOOT (PERMITTED) |
| static struct rsa_digestinfo_prefix * | rsa_find_prefix (struct digest_algorithm *digest) |
| | Identify RSA prefix.
|
| static void | rsa_free (struct rsa_context *context) |
| | Free RSA dynamic storage.
|
| static int | rsa_alloc (struct rsa_context *context, size_t modulus_len, size_t exponent_len) |
| | Allocate RSA dynamic storage.
|
| static int | rsa_parse_mod_exp (struct asn1_cursor *modulus, struct asn1_cursor *exponent, const struct asn1_cursor *raw) |
| | Parse RSA modulus and exponent.
|
| static int | rsa_init (struct rsa_context *context, const struct asn1_cursor *key) |
| | Initialise RSA cipher.
|
| static int | rsa_cipher (struct rsa_context *context, const void *in, void *out) |
| | Perform RSA cipher operation.
|
| static int | rsa_pkcs1_encrypt (struct pubkey_algorithm *pubkey __unused, const struct asn1_cursor *key, const struct asn1_cursor *plaintext, struct asn1_builder *ciphertext) |
| | Encrypt using RSA PKCS#1.
|
| static int | rsa_pkcs1_decrypt (struct pubkey_algorithm *pubkey __unused, const struct asn1_cursor *key, const struct asn1_cursor *ciphertext, struct asn1_builder *plaintext) |
| | Decrypt using RSA PKCS#1.
|
| static int | rsa_pkcs1_encode (struct rsa_context *context, struct digest_algorithm *digest, const void *value, const void *reference __unused, void *encoded) |
| | Encode digest using RSA PKCS#1.
|
| static void | rsa_xor_mask (struct digest_algorithm *digest, void *ctx, void *out, const void *seed, void *xor, size_t len) |
| | Apply RSA PSS mask generation function.
|
| static int | rsa_pss_encode (struct rsa_context *context, struct digest_algorithm *digest, const void *value, const void *reference, void *encoded) |
| | Encode digest using RSA PSS.
|
| static int | rsa_sign (struct pubkey_algorithm *pubkey, const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, struct asn1_builder *signature) |
| | Sign digest value using RSA.
|
| static int | rsa_verify (struct pubkey_algorithm *pubkey, const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, const struct asn1_cursor *signature) |
| | Verify signed digest value using RSA.
|
| static int | rsa_match (struct pubkey_algorithm *pubkey __unused, const struct asn1_cursor *private_key, const struct asn1_cursor *public_key) |
| | Check for matching RSA public/private key pair.
|
| | REQUIRING_SYMBOL (rsa_algorithm) |
| | REQUIRE_OBJECT (config_crypto) |
RSA public-key cryptography.
RSA is documented in RFC 3447 and updated in RFC 8017.
Definition in file rsa.c.
Allocate RSA dynamic storage.
- Parameters
-
| context | RSA context |
| modulus_len | Modulus length |
| exponent_len | Exponent length |
- Return values
-
Definition at line 131 of file rsa.c.
132 {
137 struct {
139 bigint_t ( exponent_size ) exponent;
144
145
146 dynamic =
malloc (
sizeof ( *dynamic ) );
147 if ( ! dynamic )
149
150
152 context->
modulus0 = &dynamic->modulus.element[0];
154 context->
max_len = modulus_len;
155 context->
exponent0 = &dynamic->exponent.element[0];
157 context->
input0 = &dynamic->input.element[0];
158 context->
output0 = &dynamic->output.element[0];
159 context->
tmp = &dynamic->tmp;
160
161 return 0;
162}
uint16_t size
Buffer size.
#define ENOMEM
Not enough space.
#define bigint_mod_exp_tmp_len(modulus)
Calculate temporary working space required for moduluar exponentiation.
#define bigint_t(size)
Define a big-integer type.
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
void * malloc(size_t size)
Allocate memory.
bigint_element_t * exponent0
Exponent.
bigint_element_t * input0
Input buffer.
void * tmp
Temporary working space for modular exponentiation.
bigint_element_t * modulus0
Modulus.
unsigned int exponent_size
Exponent size.
bigint_element_t * output0
Output buffer.
size_t max_len
Modulus length.
unsigned int size
Modulus size.
References __attribute__, bigint_mod_exp_tmp_len, bigint_required_size, bigint_t, rsa_context::dynamic, ENOMEM, rsa_context::exponent0, rsa_context::exponent_size, rsa_context::input0, malloc(), rsa_context::max_len, rsa_context::modulus0, rsa_context::output0, rsa_context::size, size, rsa_context::tmp, and tmp.
Referenced by rsa_init().
Parse RSA modulus and exponent.
- Parameters
-
| modulus | Modulus to fill in |
| exponent | Exponent to fill in |
| raw | ASN.1 cursor |
- Return values
-
Definition at line 172 of file rsa.c.
174 {
176 int is_private;
178
179
180 memcpy ( &cursor,
raw,
sizeof ( cursor ) );
182
183
185
186
187 is_private = 1;
188
189
191
192
195
196
198
199
201
202
204
205
207 }
208
209 } else {
210
211
212 is_private = 0;
213
214
216
217
219
220
222 }
223
224
225 memcpy ( modulus, &cursor,
sizeof ( *modulus ) );
229
230
231 if ( is_private )
233
234
235 memcpy ( exponent, &cursor,
sizeof ( *exponent ) );
238
239 return 0;
240}
struct arbelprm_rc_send_wqe rc
int asn1_enter_unsigned(struct asn1_cursor *cursor)
Enter ASN.1 unsigned integer.
int asn1_skip_any(struct asn1_cursor *cursor)
Skip ASN.1 object of any type.
int asn1_check_algorithm(const struct asn1_cursor *cursor, struct asn1_algorithm *expected, struct asn1_cursor *params)
Check ASN.1 OID-identified algorithm.
int asn1_enter(struct asn1_cursor *cursor, unsigned int type)
Enter ASN.1 object.
int asn1_skip(struct asn1_cursor *cursor, unsigned int type)
Skip ASN.1 object.
int asn1_enter_bits(struct asn1_cursor *cursor, unsigned int *unused)
Enter ASN.1 bit string.
#define ASN1_INTEGER
ASN.1 integer.
#define ASN1_SEQUENCE
ASN.1 sequence.
#define ASN1_OCTET_STRING
ASN.1 octet string.
static unsigned int asn1_type(const struct asn1_cursor *cursor)
Extract ASN.1 type.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
References asn1_check_algorithm(), asn1_enter(), asn1_enter_bits(), asn1_enter_unsigned(), ASN1_INTEGER, ASN1_OCTET_STRING, ASN1_SEQUENCE, asn1_skip(), asn1_skip_any(), asn1_type(), memcpy(), NULL, raw, and rc.
Referenced by rsa_init(), and rsa_match().
Initialise RSA cipher.
- Parameters
-
| context | RSA context |
| key | Key |
- Return values
-
Definition at line 249 of file rsa.c.
250 {
255
256
257 memset ( context, 0,
sizeof ( *context ) );
258
259
261 DBGC ( context,
"RSA %p invalid modulus/exponent:\n", context );
263 goto err_parse;
264 }
265
266 DBGC ( context,
"RSA %p modulus:\n", context );
267 DBGC_HDA ( context, 0, modulus.data, modulus.len );
268 DBGC ( context,
"RSA %p exponent:\n", context );
269 DBGC_HDA ( context, 0, exponent.data, exponent.len );
270
271
272 msb = *( (
const uint8_t * ) modulus.data );
273 if ( ! msb ) {
274 DBGC ( context,
"RSA %p invalid modulus MSB\n", context );
276 goto err_msb;
277 }
278 context->
mask = ( ( 1 << (
fls ( msb ) - 1 ) ) - 1 );
279
280
281 if ( (
rc =
rsa_alloc ( context, modulus.len, exponent.len ) ) != 0 )
282 goto err_alloc;
283
284
286 modulus.data, modulus.len );
288 context->
exponent0 ), exponent.data, exponent.len );
289
290 return 0;
291
293 err_alloc:
294 err_msb:
295 err_parse:
297}
union @162305117151260234136356364136041353210355154177 key
#define EINVAL
Invalid argument.
#define bigint_init(value, data, len)
Initialise big integer.
void * memset(void *dest, int character, size_t len) __nonnull
#define fls(x)
Find last (i.e.
static void rsa_free(struct rsa_context *context)
Free RSA dynamic storage.
static int rsa_parse_mod_exp(struct asn1_cursor *modulus, struct asn1_cursor *exponent, const struct asn1_cursor *raw)
Parse RSA modulus and exponent.
static int rsa_alloc(struct rsa_context *context, size_t modulus_len, size_t exponent_len)
Allocate RSA dynamic storage.
uint8_t mask
Modulus MSB mask.
References bigint_init, bigint_t, asn1_cursor::data, DBGC, DBGC_HDA, EINVAL, rsa_context::exponent0, rsa_context::exponent_size, fls, key, asn1_cursor::len, rsa_context::mask, memset(), rsa_context::modulus0, rc, rsa_alloc(), rsa_free(), rsa_parse_mod_exp(), and rsa_context::size.
Referenced by rsa_pkcs1_decrypt(), rsa_pkcs1_encrypt(), rsa_sign(), and rsa_verify().
| int rsa_cipher |
( |
struct rsa_context * | context, |
|
|
const void * | in, |
|
|
void * | out ) |
|
static |
Perform RSA cipher operation.
- Parameters
-
| context | RSA context |
| in | Input buffer |
| out | Output buffer |
- Return values
-
| canonical | Input was in canonical form |
Definition at line 307 of file rsa.c.
308 {
314 int canonical;
315
316
319
320
322
323
325
326
327 return canonical;
328}
#define bigint_mod_exp(base, modulus, exponent, result, tmp)
Perform modular exponentiation of big integers.
#define bigint_is_geq(value, reference)
Compare big integers.
#define bigint_done(value, out, len)
Finalise big integer.
References bigint_done, bigint_init, bigint_is_geq, bigint_mod_exp, bigint_t, rsa_context::exponent0, rsa_context::exponent_size, in, rsa_context::input0, rsa_context::max_len, rsa_context::modulus0, out, rsa_context::output0, rsa_context::size, and rsa_context::tmp.
Referenced by rsa_pkcs1_decrypt(), rsa_pkcs1_encrypt(), rsa_sign(), and rsa_verify().
Encrypt using RSA PKCS#1.
- Parameters
-
| pubkey | Public-key algorithm |
| key | Key |
| plaintext | Plaintext |
| ciphertext | Ciphertext |
- Return values
-
| ciphertext_len | Length of ciphertext, or negative error |
Definition at line 339 of file rsa.c.
342 {
344 void *temp;
346 size_t min_len;
347 size_t pad_len;
348 int canonical;
350
351 DBGC ( &context,
"RSA %p encrypting:\n", &context );
353
354
356 goto err_init;
357
358
359 min_len = ( 1 + 1 + 8
360 + 1 + plaintext->
len );
361 if ( min_len > context.max_len ) {
362 DBGC ( &context,
"RSA %p modulus too small for %zd-byte "
363 "plaintext\n", &context, plaintext->
len );
364 goto err_sanity;
365 }
366 pad_len = ( 8 + context.max_len - min_len );
367
368
369
370
371 temp = context.output0;
372 encoded = temp;
373 encoded[0] = 0x00;
374 encoded[1] = 0x02;
376 DBGC ( &context,
"RSA %p could not generate random data: %s\n",
378 goto err_random;
379 }
380 encoded[ 2 + pad_len ] = 0x00;
381 memcpy ( &encoded[ context.max_len - plaintext->
len ],
382 plaintext->
data, plaintext->
len );
383 DBGC ( &context,
"RSA %p encoded:\n", &context );
384 DBGC_HDA ( &context, 0, encoded, context.max_len );
385
386
387 if ( (
rc =
asn1_grow ( ciphertext, context.max_len ) ) != 0 )
388 goto err_grow;
389
390
393 DBGC ( &context,
"RSA %p encrypted:\n", &context );
394 DBGC_HDA ( &context, 0, ciphertext->
data, context.max_len );
395
396
398
399 return 0;
400
401 err_grow:
402 err_random:
403 err_sanity:
405 err_init:
407}
int asn1_grow(struct asn1_builder *builder, size_t extra)
Grow ASN.1 builder.
#define assert(condition)
Assert a condition at run-time.
static int rsa_cipher(struct rsa_context *context, const void *in, void *out)
Perform RSA cipher operation.
int(* rsa_get_random)(void *data, size_t len)
Generate random data.
static int rsa_init(struct rsa_context *context, const struct asn1_cursor *key)
Initialise RSA cipher.
char * strerror(int errno)
Retrieve string representation of error number.
const void * data
Start of data.
size_t len
Length of data.
References __unused, asn1_grow(), assert, asn1_builder::data, asn1_cursor::data, DBGC, DBGC_HDA, key, asn1_cursor::len, rsa_context::max_len, memcpy(), rsa_context::output0, rc, rsa_cipher(), rsa_free(), rsa_get_random, rsa_init(), and strerror().
Decrypt using RSA PKCS#1.
- Parameters
-
| pubkey | Public-key algorithm |
| key | Key |
| ciphertext | Ciphertext |
| plaintext | Plaintext |
- Return values
-
Definition at line 418 of file rsa.c.
421 {
423 void *temp;
430 int canonical;
432
433 DBGC ( &context,
"RSA %p decrypting:\n", &context );
435
436
438 goto err_init;
439
440
441 if ( ciphertext->
len != context.max_len ) {
442 DBGC ( &context,
"RSA %p ciphertext incorrect length (%zd "
443 "bytes, should be %zd)\n",
444 &context, ciphertext->
len, context.max_len );
446 goto err_sanity;
447 }
448
449
450
451
452 temp = context.input0;
453 encoded = temp;
455 DBGC ( &context,
"RSA %p encoded:\n", &context );
456 DBGC_HDA ( &context, 0, encoded, context.max_len );
457 if ( ! canonical ) {
458 DBGC ( &context,
"RSA %p ciphertext was not canonical\n",
459 &context );
461 goto err_canonical;
462 }
463
464
465 end = ( encoded + context.max_len );
466 if ( ( encoded[0] != 0x00 ) || ( encoded[1] != 0x02 ) ) {
468 goto err_invalid;
469 }
472 if ( ( ! zero ) || ( ( zero -
pad ) < 8 ) ) {
473 DBGC ( &context,
"RSA %p invalid decrypted message:\n",
474 &context );
475 DBGC_HDA ( &context, 0, encoded, context.max_len );
477 goto err_invalid;
478 }
479 start = ( zero + 1 );
481
482
484 goto err_grow;
485
486
488 DBGC ( &context,
"RSA %p decrypted:\n", &context );
490
491
493
494 return 0;
495
496 err_grow:
497 err_invalid:
498 err_canonical:
499 err_sanity:
501 err_init:
503}
uint32_t start
Starting offset.
#define ERANGE
Result too large.
uint32_t end
Ending offset.
void * memchr(const void *src, int character, size_t len)
Find character within a memory region.
References __unused, asn1_grow(), asn1_builder::data, asn1_cursor::data, DBGC, DBGC_HDA, EINVAL, end, ERANGE, rsa_context::input0, key, asn1_cursor::len, len, rsa_context::max_len, memchr(), memcpy(), pad, rc, rsa_cipher(), rsa_free(), rsa_init(), and start.
| int rsa_pkcs1_encode |
( |
struct rsa_context * | context, |
|
|
struct digest_algorithm * | digest, |
|
|
const void * | value, |
|
|
const void *reference | __unused, |
|
|
void * | encoded ) |
|
static |
Encode digest using RSA PKCS#1.
- Parameters
-
| context | RSA context |
| digest | Digest algorithm |
| value | Digest value |
| reference | Reference encoded digest (or NULL) |
| encoded | Encoded digest |
- Return values
-
Definition at line 515 of file rsa.c.
519 {
523 size_t digestinfo_len;
524 size_t min_len;
525 size_t pad_len;
526
527
530 DBGC ( context,
"RSA %p has no prefix for %s\n",
533 }
534
535
536 digestinfo_len = ( digest_len + (
prefix ?
prefix->len : 0 ) );
537
538
539 min_len = ( 1 + 1 + 8
540 + 1 + digestinfo_len );
541 if ( min_len > context->
max_len ) {
542 DBGC ( context,
"RSA %p modulus too small for %s digest\n",
545 }
546 DBGC ( context,
"RSA %p encoding %s digest using PKCS#1:\n",
549
550
551 *(temp++) = 0x00;
552 *(temp++) = 0x01;
553 pad_len = ( 8 + context->
max_len - min_len );
554 memset ( temp, 0xff, pad_len );
555 temp += pad_len;
556 *(temp++) = 0x00;
560 }
562 temp += digest_len;
564 DBGC ( context,
"RSA %p encoded %s digest using PKCS#1:\n",
567
568 return 0;
569}
pseudo_bit_t value[0x00020]
#define ENOTSUP
Operation not supported.
static int is_md5_sha1(struct digest_algorithm *digest)
Check if a digest algorithm is MD5+SHA1.
static struct rsa_digestinfo_prefix * rsa_find_prefix(struct digest_algorithm *digest)
Identify RSA prefix.
size_t digestsize
Digest size.
const char * name
Algorithm name.
References __unused, assert, DBGC, DBGC_HDA, rsa_digestinfo_prefix::digest, digest_algorithm::digestsize, ENOTSUP, ERANGE, is_md5_sha1(), rsa_context::max_len, memcpy(), memset(), digest_algorithm::name, prefix, rsa_find_prefix(), and value.
| void rsa_xor_mask |
( |
struct digest_algorithm * | digest, |
|
|
void * | ctx, |
|
|
void * | out, |
|
|
const void * | seed, |
|
|
void * | xor, |
|
|
size_t | len ) |
|
static |
Apply RSA PSS mask generation function.
- Parameters
-
| digest | Digest algorithm |
| ctx | Digest context buffer |
| out | Digest output buffer |
| seed | Mask seed |
| xor | XOR buffer |
| len | Length of XOR buffer |
Definition at line 581 of file rsa.c.
583 {
588 unsigned int i;
589
591
592
597
598
599 for ( i = 0 ;
len && ( i < digest_len ) ; i++,
len-- )
600 *(xor_byte++) ^= out_byte[i];
601
602
604 }
605}
struct golan_eq_context ctx
static void digest_init(struct digest_algorithm *digest, void *ctx)
static void digest_final(struct digest_algorithm *digest, void *ctx, void *out)
static void digest_update(struct digest_algorithm *digest, void *ctx, const void *data, size_t len)
static u32 xor(u32 a, u32 b)
References ctx, rsa_digestinfo_prefix::digest, digest_final(), digest_init(), digest_update(), digest_algorithm::digestsize, htonl, len, ntohl, out, and xor().
Referenced by rsa_pss_encode().
| int rsa_pss_encode |
( |
struct rsa_context * | context, |
|
|
struct digest_algorithm * | digest, |
|
|
const void * | value, |
|
|
const void * | reference, |
|
|
void * | encoded ) |
|
static |
Encode digest using RSA PSS.
- Parameters
-
| context | RSA context |
| digest | Digest algorithm |
| value | Digest value |
| reference | Reference encoded digest (or NULL) |
| encoded | Encoded digest |
- Return values
-
Definition at line 617 of file rsa.c.
620 {
625 size_t mask_len;
626 size_t pad_len;
627 size_t min_len;
629 void *salt;
634
635
636 min_len = ( sizeof ( *head ) + digest_len +
637 digest_len + sizeof ( *tail ) );
638 if ( context->
max_len < min_len ) {
639 DBGC ( context,
"RSA %p %s formatted digest value too long "
640 "(%zd bytes, max %zd)\n", context, digest->
name,
643 }
644 DBGC ( context,
"RSA %p encoding %s digest using PSS:\n",
645 context, digest->
name );
647
648
649 pad_len = ( context->
max_len - min_len );
650 msb = encoded;
651 head = ( msb + pad_len );
652 salt = (
head +
sizeof ( *head ) );
653 hash = ( salt + digest_len );
654 tail = (
hash + digest_len );
655 mask_len = ( pad_len + sizeof ( *head ) + digest_len );
657
658
659 if ( reference ) {
662 } else {
664 DBGC ( context,
"RSA %p could not generate random "
667 }
668 }
669 DBGC ( context,
"RSA %p salt:\n", context );
670 DBGC_HDA ( context, 0, salt, digest_len );
671
672
678
679
680 memset ( encoded, 0, pad_len );
683 *msb &= context->
mask;
684 *tail = 0xbc;
685 DBGC ( context,
"RSA %p encoded %s digest using PSS:\n",
686 context, digest->
name );
688
689 return 0;
690}
pseudo_bit_t hash[0x00010]
static void rsa_xor_mask(struct digest_algorithm *digest, void *ctx, void *out, const void *seed, void *xor, size_t len)
Apply RSA PSS mask generation function.
size_t ctxsize
Context size.
References assert, ctx, digest_algorithm::ctxsize, DBGC, DBGC_HDA, rsa_digestinfo_prefix::digest, digest_final(), digest_init(), digest_update(), digest_algorithm::digestsize, ERANGE, hash, head, rsa_context::mask, rsa_context::max_len, memcpy(), memset(), digest_algorithm::name, out, rc, rsa_get_random, rsa_xor_mask(), strerror(), and value.
Sign digest value using RSA.
- Parameters
-
| pubkey | Public-key algorithm |
| key | Key |
| digest | Digest algorithm |
| value | Digest value |
| signature | Signature |
- Return values
-
Definition at line 702 of file rsa.c.
705 {
708 int canonical;
710
711 DBGC ( &context,
"RSA %p signing %s digest:\n",
712 &context, digest->
name );
714
715
717 goto err_init;
718
719
721 goto err_grow;
722
723
724 if ( (
rc = encode ( &context, digest,
value,
NULL,
726 goto err_encode;
727
728
731 DBGC ( &context,
"RSA %p signed %s digest:\n", &context, digest->
name );
733
734
736
737 return 0;
738
739 err_encode:
740 err_grow:
742 err_init:
744}
u8 signature
CPU signature.
int rsa_encode_t(struct rsa_context *context, struct digest_algorithm *digest, const void *value, const void *reference, void *encoded)
Encode digest.
void * priv
Algorithm private data.
References asn1_grow(), assert, DBGC, DBGC_HDA, digest_algorithm::digestsize, key, rsa_context::max_len, digest_algorithm::name, NULL, pubkey_algorithm::priv, rc, rsa_cipher(), rsa_free(), rsa_init(), signature, and value.
Verify signed digest value using RSA.
- Parameters
-
| pubkey | Public-key algorithm |
| key | Key |
| digest | Digest algorithm |
| value | Digest value |
| signature | Signature |
- Return values
-
Definition at line 756 of file rsa.c.
759 {
762 void *temp;
763 void *expected;
764 void *actual;
765 int canonical;
767
768 DBGC ( &context,
"RSA %p verifying %s digest:\n",
769 &context, digest->
name );
772
773
775 goto err_init;
776
777
778 if (
signature->len != context.max_len ) {
779 DBGC ( &context,
"RSA %p signature incorrect length (%zd "
780 "bytes, should be %zd)\n",
781 &context,
signature->len, context.max_len );
783 goto err_sanity;
784 }
785
786
787
788
789 temp = context.input0;
790 expected = temp;
792 DBGC ( &context,
"RSA %p deciphered signature:\n", &context );
793 DBGC_HDA ( &context, 0, expected, context.max_len );
794 if ( ! canonical ) {
795 DBGC ( &context,
"RSA %p signature was not canonical\n",
796 &context );
798 goto err_canonical;
799 }
800
801
802
803
804 temp = context.output0;
805 actual = temp;
806 if ( (
rc = encode ( &context, digest,
value, expected,
807 actual ) ) != 0 )
808 goto err_encode;
809
810
811 if (
memcmp ( actual, expected, context.max_len ) != 0 ) {
812 DBGC ( &context,
"RSA %p signature verification failed\n",
813 &context );
815 goto err_verify;
816 }
817
818
820
821 DBGC ( &context,
"RSA %p signature verified successfully\n", &context );
822 return 0;
823
824 err_verify:
825 err_encode:
826 err_canonical:
827 err_sanity:
829 err_init:
831}
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
References DBGC, DBGC_HDA, digest_algorithm::digestsize, EACCES_VERIFY, ERANGE, rsa_context::input0, key, rsa_context::max_len, memcmp(), digest_algorithm::name, rsa_context::output0, pubkey_algorithm::priv, rc, rsa_cipher(), rsa_free(), rsa_init(), signature, and value.
Initial value: = {
.name = "rsa_pss",
}
int pubkey_null_decrypt(struct pubkey_algorithm *pubkey __unused, const struct asn1_cursor *key __unused, const struct asn1_cursor *ciphertext __unused, struct asn1_builder *plaintext __unused)
int pubkey_null_encrypt(struct pubkey_algorithm *pubkey __unused, const struct asn1_cursor *key __unused, const struct asn1_cursor *plaintext __unused, struct asn1_builder *ciphertext __unused)
static int rsa_pss_encode(struct rsa_context *context, struct digest_algorithm *digest, const void *value, const void *reference, void *encoded)
Encode digest using RSA PSS.
RSA-PSS public-key algorithm.
Definition at line 877 of file rsa.c.
877 {
878 .name = "rsa_pss",
885};
Referenced by PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), PUBKEY_TEST(), and PUBKEY_TEST().