Lukasz Pawelczyk [Tue, 12 Apr 2016 11:30:02 +0000 (13:30 +0200)]
Add YACA_ERROR_SIGNATURE_INVALID error code. Mentioned in the doxygen.
Change-Id: Ieff9d6a8408c878b7ff9656f637382abab23f742
Dariusz Michaluk [Mon, 11 Apr 2016 12:24:27 +0000 (14:24 +0200)]
Enable extra compilation flags.
Change-Id: I689300d8176eacdad75ddf19bb1b3f91510e872d
Lukasz Pawelczyk [Fri, 8 Apr 2016 14:26:48 +0000 (16:26 +0200)]
Fix compilation with Clang.
Some bugs in the code fixed, caught by Clang warnings/errors.
Change-Id: If6b2b617222ea8d07d5d3af4202a4dae3b7ebebe
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Mateusz Kulikowski [Mon, 11 Apr 2016 09:43:04 +0000 (11:43 +0200)]
yaca_ctx_free: NULL context handling
Ignore null contexts.
Change-Id: I7ecac9603519d91d5708f4eed11af0a9f8a4ce17
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Fri, 8 Apr 2016 10:49:31 +0000 (12:49 +0200)]
Rename get_digest_algorithm -> digest_get_algorithm
Use common naming for internal API
Change-Id: Ie6dce91fca60d099249e32938b9ebc5dd8a1a6d2
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Fri, 8 Apr 2016 10:48:07 +0000 (12:48 +0200)]
Move key structures to internal API header, expose getters
- Rename get_evp|simple_key to key_get_evp|simple and expose as internal API
- Move key structures to internal API header
Change-Id: I192d456b90043446e93b788fab5c9e5625dfd3f6
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Fri, 8 Apr 2016 10:25:37 +0000 (12:25 +0200)]
Convert all key lengths to bits
- Rename API parameters to avoid confusion (key_len -> key_bits)
- Rename internal key length to key_bits
- Fix key length handling where it was done incorrectly
Change-Id: If3dcf8ad87246a144019d3fc93c6251c3529d881
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Wed, 6 Apr 2016 13:33:39 +0000 (15:33 +0200)]
key: Cleanups
- Clean import for symmetric keys
- Clean generation of "simple/single" keys
- Return proper error from yaca_key_gen (key not supported vs invalid type)
Change-Id: Ia993ad1b1908dd9c5babc31b687e2e9b9bc07eba
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Wed, 6 Apr 2016 13:32:10 +0000 (15:32 +0200)]
key: Check for key_len overflows
Affected functions:
- key_import
- key_gen
Change-Id: I1b2898b03d3bf950706c21671afe9d6a89311255
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Wed, 6 Apr 2016 13:31:22 +0000 (15:31 +0200)]
key: implement pbkdf2
- Fixup key_len - it is now size_t
- Add maximum password length
Change-Id: Ic5bc6de538f305020c52219793e2dc440de47eb3
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Mon, 4 Apr 2016 13:23:38 +0000 (15:23 +0200)]
digest: Add get_digest_algorithm
Add API to translate yaca_digest_algo_e to EVP_MD.
It is needed by other modules (like pbkdf2, message sign/verify etc.).
Change-Id: I0b73eb51e076e443ebc269f96772c438479c81f5
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Thu, 7 Apr 2016 14:37:21 +0000 (16:37 +0200)]
Remove private headers (*_p.h)
Merge all internal defines / macros / declarations into internal.h
This file may be later split, but for now it's small enough.
Change-Id: I5f00c856fd7daa0773fd6ccdb175312df1e06818
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Mon, 4 Apr 2016 13:20:29 +0000 (15:20 +0200)]
compilation: use c11 instead of c99
Change-Id: I1cea470f7ee346bf9cd38899c592fbc973568e83
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Wed, 6 Apr 2016 11:27:33 +0000 (13:27 +0200)]
Add coding rules document
Based on internal discussions and tizen rules.
Change-Id: Ibf4a65635bfd6adbc3259a28b948591e30d3f9c6
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Lukasz Pawelczyk [Wed, 6 Apr 2016 12:34:03 +0000 (14:34 +0200)]
With cmake we should not allow the main git directory to be polluted.
Change-Id: I24e334e7296af32c6e5de81cefb1ff8ece7305d2
Lukasz Pawelczyk [Wed, 6 Apr 2016 12:33:39 +0000 (14:33 +0200)]
Fix a SIGSEGV in key-exchange example. It's still not implemented though.
Change-Id: I2ea56f1109d799d77c1a322567250afca68da13b
Lukasz Pawelczyk [Wed, 6 Apr 2016 12:32:14 +0000 (14:32 +0200)]
Some minor digest changes.
- code style to make it more similar to the recent key changes
- digest_ctx_free()
Change-Id: Icf11abc94fb4811edfb6a9350905aed7f29e8e78
Lukasz Pawelczyk [Wed, 6 Apr 2016 12:31:21 +0000 (14:31 +0200)]
Partially implement a new key type (evp) and yaca_key_gen_pair()
Change-Id: I7c0d41d734284544585a173f2c64c5b6e77f4b24
Mateusz Kulikowski [Wed, 6 Apr 2016 09:06:39 +0000 (11:06 +0200)]
Rename owl -> yaca
Use official project name - YACA (Yet Another Crypto API)
Change-Id: Ib226ee33efafe79663017cedcbf589137c2799fb
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Krzysztof Jackiewicz [Tue, 5 Apr 2016 11:55:23 +0000 (13:55 +0200)]
Make binary install dir configurable
Change-Id: I83eab84f09e81ee871a5dae56f2061f9899f6a32
Lukasz Pawelczyk [Tue, 5 Apr 2016 10:35:39 +0000 (12:35 +0200)]
Re-indent the definitions after adding the API prefix.
Change-Id: Ic887def78ea211b6fbf0e1670e9b4c623884e71a
Krzysztof Jackiewicz [Mon, 4 Apr 2016 09:09:29 +0000 (11:09 +0200)]
Add cmake scripts for example compilation
Change-Id: I0eaf20b6e20bf0285e50b066572d53cc93074efe
Krzysztof Jackiewicz [Mon, 4 Apr 2016 09:42:55 +0000 (11:42 +0200)]
Fix digest ctx initalization
Change-Id: I65dfef2680303ff51106ad86d739f07c763646ec
Krzysztof Jackiewicz [Mon, 4 Apr 2016 09:08:53 +0000 (11:08 +0200)]
Rename 'crypto' to 'owl' in include directives
Change-Id: Ia568b1f875eee4059cfb9cf3c9342c1d04515ca0
Dariusz Michaluk [Thu, 31 Mar 2016 09:45:10 +0000 (11:45 +0200)]
Add build/packaging system
Change-Id: I218be0c159121689213dbfb3b8a1407a9405890e
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Dariusz Michaluk [Thu, 31 Mar 2016 12:50:43 +0000 (14:50 +0200)]
Add LICENSE file
Change-Id: I59f9fc549eeb776260b3487431337ad51eed5816
Mateusz Kulikowski [Fri, 1 Apr 2016 17:22:15 +0000 (19:22 +0200)]
More cleanups:
- added missing TODOs as comments
- upgraded owl_exit
- added license and init/exit to test.c
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Lukasz Pawelczyk [Thu, 31 Mar 2016 14:31:03 +0000 (16:31 +0200)]
Cleanups
- coding style
- some fixes after review comments
- API define for API calls, rest hidden by default
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Change-Id: Iefb002dc9b4212279dc10d5cafa2efcdc6fd4729
Lukasz Pawelczyk [Thu, 31 Mar 2016 12:40:26 +0000 (14:40 +0200)]
Renamed the API from crypto_ to owl_. Filenames not changed for now.
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Change-Id: Ibb0b3a430033216efb3035a55643bf489553dd33
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Dariusz Michaluk [Thu, 31 Mar 2016 12:50:01 +0000 (14:50 +0200)]
Add doxygen config
Change-Id: Id594f8fdd7d9bc8543fb3b9bede2ab6bb23ad5d2
Mateusz Kulikowski [Thu, 31 Mar 2016 06:25:16 +0000 (08:25 +0200)]
Library code stub
- Basic symmetric key handling
- Simple API
- crypto.c: use OPENSSL_alloc/free
Addons:
- (simple) top-level makefile, makefiles update
- Basic error codes
- Stubs for all crypto-api functions (all examples are linked properly)
- dump_hex() for examples
- Moved API headers to api/ top-level-directory
- crypto.c: init, rand_bytes, get_output_length
- ctx_p.h: stub of context
- digest.c: message digest support
- key.c: key sanity check, key import (untested), free
- simple.c: implementation of simple api (only digest tested)
- drop types_p.h
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Change-Id: I1438e8466934443afe55bb05eddd7580b9798a6a
Mateusz Kulikowski [Wed, 23 Mar 2016 15:32:52 +0000 (16:32 +0100)]
Add readme.txt with some basic information
Change-Id: Ib45e193850127307173e211f4d38598fca2a61c7
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Wed, 23 Mar 2016 13:41:17 +0000 (14:41 +0100)]
Add .gitignore
Change-Id: Ib0bcdf66db284043fed3f6689b43342d5b53ae41
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Wed, 23 Mar 2016 13:35:32 +0000 (14:35 +0100)]
Remove old code
Remove code from previous designs (no longer needed)
Change-Id: I3ad0589e3e5559f81053718e44dd797ae3b5d7c7
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Wed, 23 Mar 2016 10:37:52 +0000 (11:37 +0100)]
Add Makefile for examples
We can now compile-test them
Change-Id: I7ab33819151a2a966bc7d118d8455e9c5d7625f6
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Dariusz Michaluk [Tue, 22 Mar 2016 15:36:13 +0000 (16:36 +0100)]
Add DH and ECDH key derivation example
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Conflicts:
src/include/crypto/types.h
Change-Id: I8e18c35339f7c37f611e5e075994fe4bcac2b647
Krzysztof Jackiewicz [Tue, 22 Mar 2016 14:14:14 +0000 (15:14 +0100)]
Signatures example
Change-Id: If4c3edfc890769cd2df8c639fa9a95ca344aa494
Dariusz Michaluk [Mon, 21 Mar 2016 17:08:33 +0000 (18:08 +0100)]
Add AES-GCM encryption example
Change-Id: If0b2f47ff08150f516dad8814553b036e3849a57
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Mon, 21 Mar 2016 10:47:35 +0000 (11:47 +0100)]
Encryption example
- Simple api
- Advanced api
- seal/open
Change-Id: Idf9b507ce4403dc2c3fb3a5f7d0ab207991b0d41
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Mon, 21 Mar 2016 10:28:33 +0000 (11:28 +0100)]
Digest example added.
Add simple and advanced digest API usage examples
Change-Id: I3b0159f8da555ec33d43aa1cb6457ef886c0f14b
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Mateusz Kulikowski [Fri, 18 Mar 2016 16:07:25 +0000 (17:07 +0100)]
Synergic API
After review on Mar 18 + cleanup / comments
After review on Mar 22
Change-Id: Ie9cbd62796ae2a088e44715654c67a8b42808903
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
seonil kim [Thu, 7 Apr 2016 01:00:38 +0000 (18:00 -0700)]
Initial empty repository