R. Tyler Ballance
08d24f30a7
Revert "Add some debugging information to the __init_ecc() function"
...
This reverts commit 5fef64be63
.
2009-06-16 11:34:06 -07:00
R. Tyler Ballance
2cfc5280e7
Add the new_state hooks and the ECC_State PyCObject code for passing pointers up through Python and back down again
2009-06-16 11:30:27 -07:00
R. Tyler Ballance
852f14d8e4
Correct erroneous macro for SCAN()
...
The SCAN() macro really shouldn't be a macro, furthermore because it depends on
assert() for doing legitimate function calls, there can be broken behavior if the
assert() macro is no-opped (as it is when you include Python.h)
Signed-off-by: R. Tyler Ballance <tyler@slide.com>
2009-06-16 11:21:17 -07:00
R. Tyler Ballance
76b11a3dcf
Token commit for Review Board testing
2009-06-16 00:40:45 -07:00
R. Tyler Ballance
5fef64be63
Add some debugging information to the __init_ecc() function
...
Making vain attempts to track down these memory issues
2009-06-16 00:39:25 -07:00
R. Tyler Ballance
50135f2c6e
Start setting up ECC objects state
2009-06-16 00:14:14 -07:00
R. Tyler Ballance
7df86c7415
Add new files, update the Makefile to build libecc with more flags
2009-06-15 13:04:42 -07:00
R. Tyler Ballance
ea6dc362a3
Build out more of the CPython new type structures
2009-06-12 16:49:47 -07:00
R. Tyler Ballance
4b2b2e3e64
Experimenting with defining types inside of CPython instead of Python proper
2009-06-12 16:39:05 -07:00
R. Tyler Ballance
093479f15c
Add some distutils meta-deta
2009-06-12 15:14:34 -07:00
R. Tyler Ballance
666ce2dba4
Create the skeleton for what the final Python module will look like
2009-06-12 14:57:31 -07:00
R. Tyler Ballance
67f2f40988
Implement a refcount for the initialization of some libgcrypt necessities
...
This should allow for the CPython built on top of this to have multiple ECC_State
objects running around at once (allowing for multiple ECC objects simultaneously)
2009-06-12 13:29:36 -07:00
R. Tyler Ballance
9f7a4c9faa
Building out _pyecc (C) to support the pyecc (Python) module
2009-06-12 11:43:44 -07:00
R. Tyler Ballance
25b522e4e0
Add basic CPython build script and such
2009-06-12 08:37:01 -07:00
R. Tyler Ballance
5c53343608
Implement the "stupid" ecc_keygen(), currently requires a "priv" parameter
...
In the future, I'd like to have ecc_keygen() generate a private key if a
NULL is passed as the "priv" parameter
2009-06-11 16:39:21 -07:00
R. Tyler Ballance
35dbfccf97
Rework a lot of the handling of the keys and the global state within libecc
...
The setting up of the secure memory pool with libgcrypt and everything
else is now encapsulated inside of ecc_new_state() which handles processing
options if they're passed in.
This is necessary to have the ecc_new_keypair() also work as expected, insofar
that it should process non-NULL privkey parameters via libgcrypt such that they're
prepared for immediate use throughout libecc
2009-06-11 16:24:18 -07:00
R. Tyler Ballance
efb8d5066a
Add the ECC_Options parameter to ecc_keygen()
2009-06-11 12:09:58 -07:00
R. Tyler Ballance
e9e72fc5fc
Adjust indentation of app_print_public_key() for readability
2009-06-11 12:07:38 -07:00
R. Tyler Ballance
05d482349f
Add a few more tests, put a skeleton (read: failing) test in for ecc_keygen()
2009-06-11 12:02:46 -07:00
R. Tyler Ballance
52fe07db3b
Finish support for ecc_sign() with proper testing
...
The trick was to stuff the private key into a secure message digest
and then create the hash based off of that instead of the buffer
itself
2009-06-11 11:48:55 -07:00
R. Tyler Ballance
a63e1d662a
Fix a bit of indentation in seccure.c
2009-06-11 11:48:29 -07:00
R. Tyler Ballance
c4ccb329c5
Fix failure of the /libecc/ecc_verify/crap_sig test failure (SIGABRT)
...
If the gcry_mpi_t is an empty structure, not NULL, but empty, and you
call a gcry_mpi_release() on that structure, a double free() will occur
and pwn you.
Signed-off-by: R. Tyler Ballance <tyler@slide.com>
2009-06-11 10:38:55 -07:00
R. Tyler Ballance
eba84863f0
ecc_sign() is "working" in that it generates a sig, just not the right one.
...
Added a test to verify it's non-working state at the moment.
Also added a test to reproduce the SIGSEGV I found with ecc_verify()
and passing in nonsensical signatures
2009-06-10 23:34:32 -07:00
R. Tyler Ballance
08badcdfee
Fix indentation for readability in app_sign
2009-06-10 23:34:15 -07:00
R. Tyler Ballance
ddc74fcd21
Add a couple tests for ecc_new_data() and ecc_new_options()
2009-06-10 21:17:30 -07:00
R. Tyler Ballance
c5ce2dfba8
Make sure ecc_verify() is properly cleaning up after itself (instead of just leaking)
...
Also removed the option to disable libgcrypt's secure memory, since
it seems we need that.
2009-06-10 20:26:53 -07:00
R. Tyler Ballance
99a5a06f40
Update some documentation, remove some duplicated strings
2009-06-10 20:07:29 -07:00
R. Tyler Ballance
986a7b8057
Finish implementation of ecc_verify()
...
The code does make some assumptions, most important of which
being that the serialized signature was generated with DF_COMPACT.
Tests passing. Woot.
2009-06-10 20:03:08 -07:00
R. Tyler Ballance
3e9ec1dd44
Correct the input data, without the newline the signature is incorrect
2009-06-10 20:02:49 -07:00
R. Tyler Ballance
ed027a4b76
Fix app_verify's really messed up indentation levels so it can actually be read...
2009-06-10 19:23:04 -07:00
R. Tyler Ballance
40f93b409c
Update some documentation, separate out the argument checks for 'data' and 'signature'
2009-06-10 16:49:26 -07:00
R. Tyler Ballance
830743e0d7
Add a couple tests to verify we fail in ecc_verify() when data or signature are NULL
2009-06-10 16:32:01 -07:00
R. Tyler Ballance
cd71af1dfe
Add secure_malloc option, document it a bit and default the values of ECC_Options in the creation function
2009-06-10 16:31:40 -07:00
R. Tyler Ballance
a731f0f4c2
Filling in more blanks with ecc_verify() and the structures needed to support it
...
* Added ecc_new_data() and ecc_new_options() to allocate and zero out ECC_Data and ECC_Options objects
* Moved DEFAULT_CURVE into libecc.h, seccure.c now including it
* Starting to add tests for failure cases of ecc_verify()
2009-06-10 16:17:40 -07:00
R. Tyler Ballance
288016365e
Add __warning code, build out __init_ecc()
2009-06-10 15:36:28 -07:00
R. Tyler Ballance
5ad0fd99c8
Start building out test_libecc, a glib-testing-based executable to verify libecc functionality
2009-06-10 15:22:27 -07:00
R. Tyler Ballance
63eee34262
Add ecc_new_keypair() for generating allocated but empty ECC_KeyPair objects
2009-06-10 15:22:12 -07:00
R. Tyler Ballance
6d78a85bb3
The standard libecc and seccure executables shouldn't be linked against GLib
2009-06-10 15:21:29 -07:00
R. Tyler Ballance
cd431be82b
Flesh out the libecc interface via the header file and some doxygen doc tags
...
Signed-off-by: R. Tyler Ballance <tyler@slide.com>
2009-06-10 14:02:07 -07:00
R. Tyler Ballance
e89d6afeb3
Add docs folder with doxygen configuration
2009-06-10 14:01:29 -07:00
R. Tyler Ballance
cadd5f9783
Start fleshing out ideas on what libecc should look like
...
Signed-off-by: R. Tyler Ballance <tyler@slide.com>
2009-06-10 13:21:57 -07:00
R. Tyler Ballance
84d57a0c17
Update the Makefile to generate libecc.so (added a stub for that as well)
2009-06-10 12:30:28 -07:00
R. Tyler Ballance
38cb88c93f
Remove unnecessary targets in the Makefile
2009-06-10 11:26:57 -07:00
R. Tyler Ballance
3f362bdebe
Clean out generated docs as well
2009-06-09 11:41:18 -07:00
R. Tyler Ballance
03fc153c10
Remove generated files
2009-06-09 11:40:12 -07:00
R. Tyler Ballance
6cbd8ff9f4
Add seccure v0.4
...
Downloaded from: http://point-at-infinity.org/seccure/
2009-06-09 11:35:36 -07:00
R. Tyler Ballance
cb73562a54
Initial commit, add empty README
2009-06-09 11:27:40 -07:00