aboutsummaryrefslogtreecommitdiff
path: root/asn1.c
AgeCommit message (Collapse)Author
2020-03-10fallthrough comments to silence compiler warningsPaul Selkirk
2018-07-25Merge branch 'hashsig'Paul Selkirk
2018-07-24Add descriptions of signature algorithm OIDs, because pre-encoded ASN.1 ↵Paul Selkirk
blobs are really inscrutable.
2018-05-20Drop <assert.h> now that everything should be using hal_assert() instead.Rob Austein
2018-05-20Better hal_core_alloc() semantics, assert() and printf() cleanup.Rob Austein
Various fixes extracted from the abandoned(-for-now?) reuse-cores branch, principally: * Change hal_core_alloc*() to support core reuse and to pick the least-recently-used core of a particular type otherwise; * Replace assert() and printf() calls with hal_assert() and hal_log(), respectively. assert() is particularly useless on the HSM, since it sends its error message into hyperspace then hangs the HSM.
2018-04-19Implement hash-based signatures, per draft-mcgrew-hash-sigs-08.txtPaul Selkirk
2018-04-19Encode/decode uint32_t and octet stringsPaul Selkirk
2017-10-23Cleanup signed/unsigned mismatches, mostly in loop countersPaul Selkirk
2017-04-07Shake bugs out of hal_rpc_pkey_import().Rob Austein
2017-04-05First cut at key backup code. Not tested yet.Rob Austein
Still missing Python script to drive backup process, and need to do something about setting the EXPORTABLE key flag for this to be useful.
2017-04-04Rework PKCS #8 PrivateKeyInfo wrapper code.Rob Austein
Handle AlgorithmIdentifier.parameters as in SubjectPublicKeyInfo: the field is OPTIONAL, but it's usually set to NULL if no OID is present. I have a vague memory that this is fallout from a specification error years ago in which the OPTIONAL was accidently left out. Whatever.
2017-04-03PKCS #8 code for RSA and ECDSA.Rob Austein
Compiles, not yet tested. Existing tests need conversion to PKCS #8 before we can do anything useful with this. Once everything uses PKCS #8 instead of algorithm-specific formats, we can revisit API issues like whether hal_rpc_pkey_load() should still be taking `type` and `curve` arguments.
2017-04-02PKCS #8 ASN.1 wrapper functions.Rob Austein
2016-05-14Trailing whitespace cleanup.Rob Austein
2016-03-11First round of debugging based on RPC pkey tests: mostly ASN.1Rob Austein
silliness, with a bit of PKCS #1.5 padding silliness for desert.
2015-12-23First round of fixes for new ASN.1 and test code.Rob Austein
2015-12-22Add ASN.1 support for public keys (X.509 SubjectPublicKeyInfo format).Rob Austein
2015-12-13whack copyrightsPaul Selkirk
2015-10-29Remove unused includes.Paul Selkirk
2015-09-06Add ECPoint I/O functions. ASN.1 cleanup.Rob Austein
2015-09-02Clean up excessively complicated handling of opaque types in hash andRob Austein
RSA code; use simpler model (pointer to incomplete structure) used in ECDSA code. Refactor RSA code to use shared ASN.1 routines.
2015-08-25ASN.1 bugfixes.Rob Austein
2015-08-22Add hal_ecdsa_verify(). Move hashing out of ECDSA routines. Clean upRob Austein
a few bits that didn't pass self-review.
2015-08-21Snapshot along the way to ECDSA. Code mostly written, except forRob Austein
ecdsa_verify(). Untested. Point addition and doubling algorithms are the ones from libtomcrypt, main point of this commit is to save those before replacing them with faster algorithms from hyperelliptic.org.