|
iPXE
|
Go to the source code of this file.
Data Structures | |
| struct | pubkey_test |
| A public-key encryption and decryption test. More... | |
| struct | pubkey_sign_test |
| A public-key signature test. More... | |
Macros | |
| #define | PRIVATE(...) { __VA_ARGS__ } |
| Define inline private key data. More... | |
| #define | PUBLIC(...) { __VA_ARGS__ } |
| Define inline public key data. More... | |
| #define | PLAINTEXT(...) { __VA_ARGS__ } |
| Define inline plaintext data. More... | |
| #define | CIPHERTEXT(...) { __VA_ARGS__ } |
| Define inline ciphertext data. More... | |
| #define | SIGNATURE(...) { __VA_ARGS__ } |
| Define inline signature data. More... | |
| #define | PUBKEY_TEST(name, PUBKEY, PRIVATE, PUBLIC, PLAINTEXT, CIPHERTEXT) |
| Define a public-key encryption and decryption test. More... | |
| #define | PUBKEY_SIGN_TEST(name, PUBKEY, PRIVATE, PUBLIC, PLAINTEXT, DIGEST, SIGNATURE) |
| Define a public-key signature test. More... | |
| #define | pubkey_ok(test) pubkey_okx ( test, __FILE__, __LINE__ ) |
| Report a public key encryption and decryption test result. More... | |
| #define | pubkey_sign_ok(test) pubkey_sign_okx ( test, __FILE__, __LINE__ ) |
| Report a public key signature test result. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| void | pubkey_okx (struct pubkey_test *test, const char *file, unsigned int line) |
| Report public key encryption and decryption test result. More... | |
| void | pubkey_sign_okx (struct pubkey_sign_test *test, const char *file, unsigned int line) |
| Report public key signature test result. More... | |
| #define PRIVATE | ( | ... | ) | { __VA_ARGS__ } |
Define inline private key data.
Definition at line 48 of file pubkey_test.h.
| #define PUBLIC | ( | ... | ) | { __VA_ARGS__ } |
Define inline public key data.
Definition at line 51 of file pubkey_test.h.
| #define PLAINTEXT | ( | ... | ) | { __VA_ARGS__ } |
Define inline plaintext data.
Definition at line 54 of file pubkey_test.h.
| #define CIPHERTEXT | ( | ... | ) | { __VA_ARGS__ } |
Define inline ciphertext data.
Definition at line 57 of file pubkey_test.h.
| #define SIGNATURE | ( | ... | ) | { __VA_ARGS__ } |
Define inline signature data.
Definition at line 60 of file pubkey_test.h.
| #define PUBKEY_TEST | ( | name, | |
| PUBKEY, | |||
| PRIVATE, | |||
| PUBLIC, | |||
| PLAINTEXT, | |||
| CIPHERTEXT | |||
| ) |
Define a public-key encryption and decryption test.
| name | Test name |
| PUBKEY | Public-key algorithm |
| PRIVATE | Private key |
| PUBLIC | Public key |
| PLAINTEXT | Plaintext |
| CIPHERTEXT | Ciphertext |
| test | Encryption and decryption test |
Definition at line 73 of file pubkey_test.h.
Define a public-key signature test.
| name | Test name |
| PUBKEY | Public-key algorithm |
| PRIVATE | Private key |
| PUBLIC | Public key |
| PLAINTEXT | Plaintext |
| DIGEST | Digest algorithm |
| SIGNATURE | Signature |
| test | Signature test |
Definition at line 111 of file pubkey_test.h.
| #define pubkey_ok | ( | test | ) | pubkey_okx ( test, __FILE__, __LINE__ ) |
Report a public key encryption and decryption test result.
| test | Public key encryption and decryption test |
Definition at line 146 of file pubkey_test.h.
| #define pubkey_sign_ok | ( | test | ) | pubkey_sign_okx ( test, __FILE__, __LINE__ ) |
Report a public key signature test result.
| test | Public key signature test |
Definition at line 154 of file pubkey_test.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| void pubkey_okx | ( | struct pubkey_test * | test, |
| const char * | file, | ||
| unsigned int | line | ||
| ) |
Report public key encryption and decryption test result.
| test | Public key encryption and decryption test |
| file | Test code file |
| line | Test code line |
Definition at line 50 of file pubkey_test.c.
References asn1_built(), asn1_compare(), asn1_builder::data, free, asn1_builder::len, NULL, okx, pubkey_decrypt(), pubkey_encrypt(), pubkey_match(), and test.
| void pubkey_sign_okx | ( | struct pubkey_sign_test * | test, |
| const char * | file, | ||
| unsigned int | line | ||
| ) |
Report public key signature test result.
| test | Public key signature test |
| file | Test code file |
| line | Test code line |
Definition at line 107 of file pubkey_test.c.
References asn1_built(), asn1_compare(), digest_algorithm::ctxsize, digest_final(), digest_init(), digest_update(), digest_algorithm::digestsize, free, NULL, okx, pubkey_match(), pubkey_sign(), pubkey_verify(), signature, and test.
1.8.15