diff options
author | Jack Lloyd <[email protected]> | 2017-04-04 09:15:10 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-04-04 09:15:10 -0400 |
commit | 274ecccd1784fb6cfee83ea5a0a6cbec31881c81 (patch) | |
tree | ccc37f0009658898e6e5e3fe181dace31f327fe4 /doc | |
parent | 753b4c2d5301574d3c9390b79aa275a49809e6c8 (diff) | |
parent | faced4459edd144d0158f4908da75e8d649d43a1 (diff) |
Merge GH #964 Add various useful FFI functions for public key crypto
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/ffi.rst | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/manual/ffi.rst b/doc/manual/ffi.rst index f5f004624..5cf0dbac5 100644 --- a/doc/manual/ffi.rst +++ b/doc/manual/ffi.rst @@ -510,6 +510,21 @@ Public Key Creation, Import and Export .. cpp:function:: int botan_pubkey_destroy(botan_pubkey_t key) +.. cpp:function:: int botan_pubkey_get_field(botan_mp_t output, \ + botan_pubkey_t key, \ + const char* field_name) + + Read an algorithm specific field from the public key object, placing it into output. + For exampe "n" or "e" for RSA keys or "p", "q", "g", and "y" for DSA keys. + +.. cpp:function:: int botan_privkey_get_field(botan_mp_t output, \ + botan_privkey_t key, \ + const char* field_name) + + Read an algorithm specific field from the private key object, placing it into output. + For exampe "p" or "q" for RSA keys, or "x" for DSA keys or ECC keys. + + RSA specific functions ---------------------------------------- @@ -551,6 +566,19 @@ RSA specific functions Initialize a public RSA key using parameters n and e. +DSA specific functions +---------------------------------------- + +.. cpp:function:: int botan_privkey_load_dsa(botan_privkey_t* key, \ + botan_mp_t p, botan_mp_t q, botan_mp_t g, botan_mp_t x) + + Initialize a private DSA key using group parameters p, q, and g and private key x. + +.. cpp:function:: int botan_pubkey_load_dsa(botan_pubkey_t* key, \ + botan_mp_t p, botan_mp_t q, botan_mp_t g, botan_mp_t y) + + Initialize a private DSA key using group parameters p, q, and g and public key y. + Public Key Encryption/Decryption ---------------------------------------- |