Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Split up ffi.cpp into several files | Jack Lloyd | 2017-07-31 | 1 | -2301/+6 |
| | | | | | It was getting pretty big and would get worse over time, eg whenver I get around to adding TLS support. | ||||
* | Merge GH #1128 Improve FFI exception safety | Jack Lloyd | 2017-07-31 | 1 | -701/+347 |
|\ | |||||
| * | Add missing return in ffi_delete_object | Jack Lloyd | 2017-07-25 | 1 | -4/+5 |
| | | | | | | | | | | Somehow this still passed all the tests, downside of 0 as the success return I suppose. | ||||
| * | In FFI, check the object magic before deleting | Jack Lloyd | 2017-07-25 | 1 | -30/+42 |
| | | | | | | | | | | Previously any X_destroy function would just delete its arg regardless of whatever the application passed in. | ||||
| * | Better exception guarding in FFI | Jack Lloyd | 2017-07-25 | 1 | -671/+304 |
| | | | | | | | | | | Based on PR #1097 but I wanted to decrease the verbosity of the resulting code. | ||||
* | | Merge GH #1135 Add RFC 3394 keywrap to FFI | Jack Lloyd | 2017-07-31 | 1 | -0/+46 |
|\ \ | |/ |/| | |||||
| * | FFI: Add interface for key wrapping with RFC 3394 | Krzysztof Kwiatkowski | 2017-06-29 | 1 | -0/+46 |
| | | |||||
* | | Add SM2 signature scheme | Jack Lloyd | 2017-06-29 | 1 | -0/+56 |
| | | | | | | | | | | | | From https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02 This is a contribution from Ribose Inc (@riboseinc). | ||||
* | | ffi: Catch exceptions in botan_mp_init | Daniel Wyatt | 2017-06-28 | 1 | -3/+23 |
|/ | |||||
* | FFI: Comments from code review #1074 | Krzysztof Kwiatkowski | 2017-06-12 | 1 | -28/+65 |
| | |||||
* | FFI: privkey_load_ec and pubkey_load_ec should be available only if ECDSA or ↵ | Krzysztof Kwiatkowski | 2017-06-10 | 1 | -2/+2 |
| | | | | ECDH is compiled | ||||
* | FFI: ECDSA an ECDH keys loading from mpi. Cleanup | Krzysztof Kwiatkowski | 2017-06-10 | 1 | -77/+90 |
| | | | | | * Be more C++ and use templates instead of string comparision * Move private functions to namespace at the top of the file | ||||
* | FFI: Add functions specific to ECDSA and ECDH | Krzysztof Kwiatkowski | 2017-06-10 | 1 | -9/+62 |
| | |||||
* | FFI: Posibility to load EC pubkey | Krzysztof Kwiatkowski | 2017-06-10 | 1 | -1/+27 |
| | |||||
* | FFI: Posibility to load EC privkey | Krzysztof Kwiatkowski | 2017-06-10 | 1 | -0/+24 |
| | |||||
* | Merge GH #1066 Add Ed25519 signature scheme | Jack Lloyd | 2017-06-09 | 1 | -0/+98 |
|\ | |||||
| * | Fix FFI build when Ed25519 disabled | Jack Lloyd | 2017-06-09 | 1 | -1/+11 |
| | | |||||
| * | Add FFI test and test data from PGP draft | Jack Lloyd | 2017-06-08 | 1 | -1/+1 |
| | | |||||
| * | Ed25519 FFI | Jack Lloyd | 2017-06-08 | 1 | -0/+88 |
| | | |||||
* | | Fix compile error in FFI when RSA disabled | Jack Lloyd | 2017-06-09 | 1 | -1/+1 |
|/ | | | | [ci skip] | ||||
* | Add FFI func botan_scrub_mem | Jack Lloyd | 2017-05-29 | 1 | -0/+6 |
| | |||||
* | Add botan_hash_copy_state FFI function. | Daniel Wyatt | 2017-05-25 | 1 | -0/+6 |
| | |||||
* | Merge GH #1051 Extensions for PKCSv1.5 signature formatting | Jack Lloyd | 2017-05-19 | 1 | -0/+21 |
|\ | |||||
| * | Add botan_pkcs_hash_id to FFI | Jack Lloyd | 2017-05-18 | 1 | -0/+21 |
| | | | | | | | | | | | | Extend EMSA_PKCS1v15_Raw to optionally take a hash function for which the PKCS hash id is prefixed to the message as usual. This allows signing a message using PKCSv1.5 padding where the hash is provided externally. | ||||
* | | Maintainer mode fixes | Jack Lloyd | 2017-05-18 | 1 | -4/+4 |
|/ | |||||
* | Fix botan_privkey_load_rsa misleading parameter names. | Daniel Wyatt | 2017-05-13 | 1 | -3/+3 |
| | | | | RSA_PrivateKey's constructor take p,q,e,d,n. | ||||
* | Merge GH #1036 Add FFI botan_hash_block_size | Jack Lloyd | 2017-05-03 | 1 | -0/+5 |
|\ | |||||
| * | Add FFI botan_hash_block_size. | Daniel Wyatt | 2017-04-30 | 1 | -0/+5 |
| | | |||||
* | | Fix botan_bcrypt_is_valid return code. | Daniel Wyatt | 2017-04-29 | 1 | -2/+1 |
|/ | | | | | Currently it returns 0 on success and BOTAN_FFI_ERROR_EXCEPTION_THROWN otherwise, which is a bit inaccurate and not consistent with the rest of the FFI interface. | ||||
* | Add explicit return to FFI botan_mp_to_str. | Daniel Wyatt | 2017-04-26 | 1 | -1/+1 |
| | | | | This way we know if the buffer is insufficient. | ||||
* | Fix Clang warning in ffi | Jack Lloyd | 2017-04-19 | 1 | -121/+117 |
| | | | | | | | The do_get_field functions had C linkage but returned BigInt, which is a warning under Clang at least. Move these functions up outside of the extern "C" block, and rename them to not match the FFI function since these are not publically accessible APIs, just helper functions. | ||||
* | Mark correct variables unused in FFI botan_{pub,priv}key_load_elgamal | Simon Warta | 2017-04-16 | 1 | -7/+2 |
| | | | | Closes #1011 | ||||
* | Improve unused handling in ffi methods | Simon Warta | 2017-04-16 | 1 | -16/+8 |
| | | | | | Make sure `key` is not touched when method is not implemented. Use one line UNUSED statements | ||||
* | Merge GH #1006 Fix FFI cipher interface (see also GH #1003) | Jack Lloyd | 2017-04-15 | 1 | -0/+2 |
|\ | |||||
| * | Fix FFI cipher interface | Jack Lloyd | 2017-04-14 | 1 | -0/+2 |
| | | | | | | | | | | | | Was totally broken, when not encrypting in one shot. (GH #1003) Enable the test, which had been commented out :( | ||||
* | | Guard include of ElGamal header | Jack Lloyd | 2017-04-15 | 1 | -1/+4 |
| | | |||||
* | | Support for ElGamal in FFI interface | Krzysztof Kwiatkowski | 2017-04-14 | 1 | -0/+52 |
|/ | | | | | | * Adds `botan_pubkey_load_elgamal' and `botan_privkey_load_elgamal' functions to FFI interface. * Adds test `ffi_test_elgamal' | ||||
* | Small ffi fixes | Jack Lloyd | 2017-04-08 | 1 | -1/+1 |
| | | | | | | | | | Constify arg to botan_pk_op_decrypt, and correct comment on botan_mp_is_positive, which returns true even for zero. Considered changing botan_mp_is_positive to match the comment, and return false for zero, but we already test that botan_mp_is_positive(0) == 1, so I left it as is and fixed the comment. | ||||
* | Add block cipher interface to C API | Jack Lloyd | 2017-04-04 | 1 | -0/+77 |
| | |||||
* | Merge GH #964 Add various useful FFI functions for public key crypto | Jack Lloyd | 2017-04-04 | 1 | -81/+275 |
|\ | |||||
| * | Implement botan_pubkey_load | Jack Lloyd | 2017-04-03 | 1 | -0/+24 |
| | | | | | | | | Declared in header, but was not defined. :( | ||||
| * | Fix botan_privkey_create if the desired algorithm was not available in build | Jack Lloyd | 2017-04-03 | 1 | -8/+27 |
| | | | | | | | | | | | | If DSA was disabled, caused memory corruption/crashes due to combination of uninitialized object and the tests not checking return values as carefully as they should. | ||||
| * | Add generic getters for PK parameters in C interface | Jack Lloyd | 2017-04-02 | 1 | -75/+226 |
| | | | | | | | | Supporting RSA, DSA, and ECC. Add also DSA specific loading functions. | ||||
* | | Add some more useful bigint functions to C interface | Jack Lloyd | 2017-03-31 | 1 | -24/+84 |
|/ | |||||
* | Merge GH #899 Add ability to specify iterations when encrypting a private key | Jack Lloyd | 2017-03-29 | 1 | -4/+78 |
|\ | |||||
| * | Add ability to specify iterations when encrypting a private key | Jack Lloyd | 2017-02-26 | 1 | -4/+78 |
| | | | | | | | | GH #896 | ||||
* | | Expose BigInt API subset to C API | Jack Lloyd | 2017-03-28 | 1 | -5/+382 |
| | | | | | | | | Also adds RSA key constructors using BN | ||||
* | | Expose PK::check_key functions in C interface | Jack Lloyd | 2017-03-27 | 1 | -0/+15 |
| | | |||||
* | | Remove duplicate include GH #928 | Jack Lloyd | 2017-03-22 | 1 | -1/+0 |
|/ | |||||
* | Fix various SunCC and Solaris warnings and build problems. | Jack Lloyd | 2017-01-24 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | Based on build output sent by @noloader. If RLIMIT_MEMLOCK is not defined, assume regular user is not able to call mlock. This probably also affected Clang/GCC on Solaris. Work around resolution issue in SIMD_4x32 where it finds ambiguity between arg taking uint32_t and __m128i. This is probably some artifact of how SunCC represents vector types, and seems highly bogus in general but is easy to work around here. Change constructor taking a single value to instead be `SIMD_4x32::splat` function. The SIMD class is internal, so no API implications. Fix various warnings about lambda functions that were missing return types and which were not a single return statement. AIUI C++11 doesn't guarantee that lambda return type will be deduced in that situation, though in practice every compiler including SunCC seems to handle it. Disable AVX2 usage, since SunCC's intrinsics seem to be broken - its _mm_loadu_si256 takes non-const pointer. Rename a few variables in the tests to avoid shadowed var warnings. |