1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-30 19:03:12 +00:00
Commit Graph

272 Commits

Author SHA1 Message Date
Mirek Kratochvil
5c739804fd algos_enc: macro-squash algorighm definitions 2014-04-09 15:29:34 +02:00
Mirek Kratochvil
c85a3f72a5 hash: correctly accept HAVE_CRYPTOPP 2014-04-06 14:53:47 +02:00
Mirek Kratochvil
8e0597824a symmetric encryption working 2014-04-06 13:46:04 +02:00
Mirek Kratochvil
b30009b910 chacha: fix 2 funny oneliners 2014-04-06 13:37:26 +02:00
Mirek Kratochvil
9c4287c636 named collections for hashes and stream ciphers
also, with the funny factoryof<> and instanceof<> primitives that kindof
solve the memory trouble.
2014-04-05 23:45:01 +02:00
Mirek Kratochvil
654b2f58ef serialization: use macros for hard work 2014-04-05 14:54:54 +02:00
Mirek Kratochvil
eb47cce9ad symkey: primitive for symmetric encryption 2014-04-05 14:33:25 +02:00
Mirek Kratochvil
c5cf430ab5 fmtseq: remove internal rc4 usage, use chacha20
Result is incompatible with previous version. Those just shouldn't be
used anymore.
2014-04-05 14:04:08 +02:00
Mirek Kratochvil
37d9c9a98e algos_enc: make timing&sidechannel attacks harder
There was possible timing information leaking from failed decryptions,
new code makes the whole thing fail in almost the same time in all
cases.
2014-04-05 13:04:29 +02:00
Mirek Kratochvil
fd489ae69f generator: remove rc4 usage, some cleaning 2014-04-05 11:36:50 +02:00
Mirek Kratochvil
3659cc837e xsynd: new stream cipher
This one is especially cool. It is code based (yeyeye matches the
project name! :D ), it is provably secure (not like the others!) AAAND
is still quite fast (not fast as chacha though).
2014-04-02 10:49:55 +02:00
Mirek Kratochvil
562188b52d chacha: test vector compliance check 2014-04-01 11:41:21 +02:00
Mirek Kratochvil
39202f8dfb chacha: forgotten public 2014-04-01 11:04:49 +02:00
Mirek Kratochvil
d44ae939d5 chacha: fix discarding
although it's not needed here.
2014-03-30 19:15:43 +02:00
Mirek Kratochvil
7d1d95784a chacha: new ChaCha20 stream cipher 2014-03-29 18:10:58 +01:00
Mirek Kratochvil
6a8029e626 cosmetic fixes 2014-03-28 08:33:44 +01:00
Mirek Kratochvil
e687629323 sc: stream cipher abstraction applied to arcfour
A minor bug was discovered in padding of short message signatures. If is
silently fixed, causing some (very minor) incompatibility of signatures
with previous versions.
2014-03-19 09:30:59 +01:00
Mirek Kratochvil
a711c72953 hashfile: finished streaming support 2014-03-10 15:31:10 +01:00
Mirek Kratochvil
61802a9113 hash: cryptopp templatized, added hash_procs 2014-03-10 14:54:36 +01:00
Mirek Kratochvil
c70ed00230 hash: hash_proc, cubehashproc 2014-03-10 13:57:25 +01:00
Mirek Kratochvil
10777a8174 hashfile: integrate into actions 2014-03-10 11:20:43 +01:00
Mirek Kratochvil
6f50dab322 main: hashfile frontend 2014-03-07 08:44:23 +01:00
Mirek Kratochvil
6b220b7064 hashfile: simple implementation
to be fixed to support stream reading
2014-03-07 08:29:41 +01:00
Mirek Kratochvil
ad96ee03d2 iohelpers: templatize read_all_input 2014-03-07 08:27:23 +01:00
Mirek Kratochvil
0cdd83dbc4 mce_qd: fix unused variable warn 2014-02-26 12:51:44 +01:00
Mirek Kratochvil
7a71ca74f0 mce_qd: faster alternant check matrix computation
Save a lot of log/antilog lookups. On my machine, this is 4-6x faster.
2014-02-08 09:48:10 +01:00
Mirek Kratochvil
0978a40372 str_match: fix icase matching 2014-02-02 17:50:30 +01:00
Mirek Kratochvil
6fd26d4c79 gf2m: save some log lookups with combined ops 2014-02-02 17:47:15 +01:00
Mirek Kratochvil
b566beaa38 permutation: avoid needlessly precomputed hpermInv 2014-02-02 17:18:48 +01:00
Mirek Kratochvil
9316509223 keyring: remove obsolete code 2014-02-02 17:18:12 +01:00
Mirek Kratochvil
e66e82b9a8 str_match: keyspec matches are ignorecase 2014-02-02 17:04:49 +01:00
Mirek Kratochvil
54d5662d55 fmtseq: be more verbose about signatures left 2014-01-25 17:49:11 +01:00
Mirek Kratochvil
812ef1eac7 keyring: do backups and save some writes 2014-01-25 17:27:02 +01:00
Mirek Kratochvil
f3ede079e9 keyring: prevent data corruption from signal 2014-01-25 12:35:41 +01:00
Mirek Kratochvil
fee6b431c2 fmtseq: privkey internals checking
Simple size checks that prevent some segfaults from working with mangled
privkeys.
2014-01-25 10:34:33 +01:00
Mirek Kratochvil
a0a9263a42 main: happy new year. 2014-01-24 10:39:36 +01:00
Mirek Kratochvil
1ccd8e8b3a actions: simplify key deletion code a bit 2014-01-24 10:35:56 +01:00
Mirek Kratochvil
f2d1ba9365 actions: be helpful on missing ascii-armor option
Refs #4 on github
2014-01-24 10:30:13 +01:00
Mirek Kratochvil
06378a826a keyring: compile and work on MinGW
Thanks for suggestion&test to Jens-Uwe Rammelt <jens-uwer@web.de>.
2014-01-24 10:08:37 +01:00
Mirek Kratochvil
594e3c0ebc algos_enc: clarify padding checks 2013-10-06 09:18:08 +02:00
Mirek Kratochvil
e795744eef mce_qd: remove unnecessary root check 2013-10-06 09:09:08 +02:00
Mirek Kratochvil
5b77413a7f keyring: updating the version was not needed 2013-09-30 12:14:02 +02:00
Mirek Kratochvil
d7192caad0 serialization: bump message version strings 2013-09-30 12:06:19 +02:00
Mirek Kratochvil
5333b6e1f8 algos_sig: fix min() macro name collision with STL 2013-09-30 12:00:06 +02:00
Mirek Kratochvil
3deffb0ebe build: crypto++ support is now optional
possibly also evading "traditional" hash functions. Cubehash is good.
2013-09-30 11:49:42 +02:00
Mirek Kratochvil
1488927e73 keyring: use cubehash for KeyID
This creates incompatible keyrings, so keyring identifiers now have a
version string appended to them.
2013-09-30 11:48:04 +02:00
Mirek Kratochvil
04bbfb49ce cubehash: some basic optimization 2013-09-30 07:21:36 +02:00
Mirek Kratochvil
72bcc1080a algos_sig: new cubehash-based algorithms 2013-09-29 20:53:24 +02:00
Mirek Kratochvil
c65557724e algos_enc: new cubehash-based algorithms 2013-09-29 20:48:59 +02:00
Mirek Kratochvil
d48665750a cubehash: remove forgotten debugging 2013-09-29 20:34:05 +02:00
Mirek Kratochvil
20b73496d7 cubehash: new hash algorithm 2013-09-29 19:52:46 +02:00
Mirek Kratochvil
fae3342e18 main: remove now unnecessary licensing information 2013-09-15 15:58:01 +02:00
Mirek Kratochvil
414d203d18 tiger_hash: use crypto++ lib instead of bundle 2013-09-15 15:50:25 +02:00
Mirek Kratochvil
3af363faf3 rmd_hash: use crypto++ lib instead of bundle 2013-09-15 15:35:47 +02:00
Mirek Kratochvil
23e741c73e sha_hash: remove unnecessary stdint include 2013-09-15 15:35:15 +02:00
Mirek Kratochvil
47ccc8dcf0 algos_enc: forgotten stdint include 2013-09-15 15:33:47 +02:00
Mirek Kratochvil
95de70acbc sha_hash: use crypto++ lib instead of bundled one 2013-09-15 15:25:17 +02:00
Mirek Kratochvil
93dee89a4a algos_enc: do not collide with library min() macro 2013-09-15 15:09:01 +02:00
Mirek Kratochvil
54c9129ab1 actions: handle possible keyring saving failures 2013-09-12 13:16:57 +02:00
Mirek Kratochvil
09136ef046 actions: better keyring opening behavior
This delays opening (and locking) the keyring until all input has been
processed, and all possible errors that would make a chance that the
keyring doesn't have to be opened have been checked for.

Whole purpose was to enable codecrypt to be chained with pipes in UNIX-y way,
like this primitive certificate creation:

(echo "At `date` I certify this is The Key:" ; ccr -pa -F "the key") | ccr -s
2013-09-12 12:41:54 +02:00
Mirek Kratochvil
d1421926f9 actions: neatified message for failed verification 2013-09-12 12:30:38 +02:00
Mirek Kratochvil
329953d575 keyring: better open/close behavior 2013-09-12 12:18:17 +02:00
Mirek Kratochvil
54e45bd3d4 style modifications because of newer astyle 2013-09-12 12:15:21 +02:00
Mirek Kratochvil
93cd8f377f keyring: squash opening and loading into one func 2013-09-12 12:14:58 +02:00
Mirek Kratochvil
60749aa4cf sencode: add integer size limits 2013-07-26 09:54:55 +02:00
Mirek Kratochvil
66d7d84b13 fix CXXFLAGS="-Wall" warnings 2013-07-23 15:58:02 +02:00
Mirek Kratochvil
36b68d90c1 std namespace cleaning 2013-06-21 20:35:59 +02:00
Mirek Kratochvil
1a2d25e555 main: correct licensing information 2013-05-27 18:23:20 +02:00
Mirek Kratochvil
9c9e49ae7b fmtseq: forgotten include 2013-05-25 20:03:42 +02:00
Mirek Kratochvil
9a268d231b forgotten styleup 2013-05-25 19:27:49 +02:00
Mirek Kratochvil
b5ae7ca4dd algos_sig: added H=20 fmtseq variant
...that provide around 1 million signatures per key. That seems more
than sufficient for human usage.

Note that generating the key takes 16 times longer than for already
present algorithms (that have H=16). On my computer, it is around 4
minutes for fmtseq128N20 and 16 minutes for fmtseq256N20.
2013-05-25 19:19:22 +02:00
Mirek Kratochvil
0980ee827a sha2: fix the ugly warning
memcpy() is better than dereferencing a type-punned-pointer for
simulating memcpy()
2013-05-25 18:56:07 +02:00
Mirek Kratochvil
18449bdc8a arcfour: greatly increase discard parameters
Okay, this thing got public so it's time to make the RC4 rugged. Not
that I'd know about something that would break current implementation,
but it's nice to at least do the recommended discard correctly.

We'll probably be adding better symmetric ciphers anyway.

Note that this is an incompatible change (again). FMTSeq private keys
will need to be replaced. Existing signature validity doesn't change.
Encrypted messages will not be possible to decrypt.
2013-05-25 17:13:33 +02:00
Mirek Kratochvil
8c185c51ad mce_qd: compute check matrix on the fly
codecrypt is usually invoked only with one prepare() and decrypt(), so
this basically saves several megs of memory and cuts needed computation
time in half.
2013-05-18 10:52:57 +02:00
Mirek Kratochvil
79b17b8724 polynomial: degree computation dumbness reduced 2013-05-18 10:52:12 +02:00
Mirek Kratochvil
be13fe8dca gf2m: lowlevel speedups 2013-05-18 10:51:47 +02:00
Mirek Kratochvil
1ef1b4277b ios: don't print unnecessary newlines 2013-05-18 09:21:49 +02:00
Mirek Kratochvil
105a7731d3 bvector: massive ranking/unranking speedup 2013-05-18 09:08:24 +02:00
Mirek Kratochvil
456718e301 bvector: unranking fixed 2013-05-17 15:18:25 +02:00
Mirek Kratochvil
3f73ba54c4 algos_enc: use faster unranking for decryption 2013-05-17 15:16:42 +02:00
Mirek Kratochvil
93d6cccd4f algorithm: remove identification
it's gonna be used some other way
2013-05-03 14:42:58 +02:00
Mirek Kratochvil
63d51911f9 algos_enc: also pad beginning of the message
to avoid possible known plaintext attacks on the symmetric cipher when
beginning of the ciphertext is known (which is a common situation, e.g.
when sign+encrypting)
2013-05-03 14:26:00 +02:00
Mirek Kratochvil
bf14ac95ad tiger: header file astyled 2013-05-01 16:48:29 +02:00
Mirek Kratochvil
1553c09d20 algos_enc: mceqd192 variant to match fmtseq192 2013-05-01 16:44:31 +02:00
Mirek Kratochvil
24bd5bd185 algos_sig: new support for fmtseq192
It's quite rational to have such algorithm. 256-bit security is usually
an overkill, and this has two times smaller signatures (around 9.5kB) is
_so_ much faster. Use it.
2013-05-01 16:25:37 +02:00
Mirek Kratochvil
9b101c9548 tiger: added tiger192 hash func 2013-05-01 16:11:45 +02:00
Mirek Kratochvil
b087848a2f sha_hash: also wrapped sha384 2013-05-01 15:49:40 +02:00
Mirek Kratochvil
805a275df7 main: some clarifications 2013-04-27 00:56:34 +02:00
Mirek Kratochvil
6e3bfbe6d3 actions: fix renaming pubkeys 2013-04-23 21:00:41 +02:00
Mirek Kratochvil
542bf554fa action: fix naming on import 2013-04-23 20:59:02 +02:00
Mirek Kratochvil
80fcaf5569 actions: pubkeys/secrets typo fix 2013-04-23 09:47:32 +02:00
Mirek Kratochvil
aa03f01530 actions: detachsign stdin/stdout support 2013-04-23 08:07:51 +02:00
Mirek Kratochvil
e19ba185b7 algos_enc: padding for hiding message length 2013-04-22 14:56:20 +02:00
Mirek Kratochvil
10d733940d actions: decrypt+verify
HAHA HA HAH
2013-04-22 13:25:28 +02:00
Mirek Kratochvil
f761fdd3a3 actions: sign+encrypt 2013-04-22 13:03:02 +02:00
Mirek Kratochvil
5e950a7a12 fmtseq: report remaining signature count 2013-04-22 12:38:27 +02:00
Mirek Kratochvil
fc163535f5 actions: verification 2013-04-22 12:30:21 +02:00
Mirek Kratochvil
fd96d76df9 actions: smarter recipient/local user search 2013-04-22 09:33:00 +02:00
Mirek Kratochvil
35f8b0477e actions: signing 2013-04-22 09:23:47 +02:00
Mirek Kratochvil
ede323e0e9 main: remove forgotten debug output 2013-04-22 09:22:56 +02:00