1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-25 16:28:15 +00:00
Commit Graph

277 Commits

Author SHA1 Message Date
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
Mirek Kratochvil
434f9ef1fb actions: decrypt clearouts 2013-04-22 09:22:37 +02:00
Mirek Kratochvil
6e10c08b4b actions: one more check 2013-04-22 08:47:49 +02:00
Mirek Kratochvil
1880b2bb21 actions: don't leak sencode on parsing failure 2013-04-22 08:23:40 +02:00
Mirek Kratochvil
7b5206abd0 actions: decrypt 2013-04-22 08:23:16 +02:00
Mirek Kratochvil
78972b886a actions: encryption 2013-04-22 08:02:29 +02:00
Mirek Kratochvil
a5f060c7fa bvector: string/bvector conversion utility 2013-04-22 07:52:48 +02:00
Mirek Kratochvil
403ec2cc88 actions: added clearsign to parameters 2013-04-22 07:38:21 +02:00
Mirek Kratochvil
903273db43 Revert "main: remove clearsign option"
This reverts commit 83e0e3ad5818c125d1b1936619576d0c032d509c.

The logic behind removing clearsign was somehow flawed by momentary
indisposition.
2013-04-22 07:33:52 +02:00
Mirek Kratochvil
c6cbd0e519 actions: use keyring manipulation functions
also stop leaking memory
2013-04-21 19:39:34 +02:00
Mirek Kratochvil
c5b4d308d1 actions: imports 2013-04-21 17:47:00 +02:00
Mirek Kratochvil
9a76830ca8 iohelpers: correctly ask questions on stderr 2013-04-21 17:31:11 +02:00
Mirek Kratochvil
c17e10b413 base64: fix problems with nonascii chars 2013-04-21 17:30:49 +02:00
Mirek Kratochvil
213600d732 actions: don't leak sencode 2013-04-21 14:25:26 +02:00
Mirek Kratochvil
cddfdba1a7 iohelpers: input reader, out_bin 2013-04-21 14:22:21 +02:00
Mirek Kratochvil
e854671d5f actions: keyring exports 2013-04-21 13:56:45 +02:00
Mirek Kratochvil
716b5eed55 iohelpers: fix cout redirection typo 2013-04-21 13:13:10 +02:00
Mirek Kratochvil
fbe829f71e actions: renaming 2013-04-21 13:09:13 +02:00
Mirek Kratochvil
02c2ba8f0f actions: deleting keys 2013-04-21 12:47:20 +02:00
Mirek Kratochvil
a6d0a590fc actions: pubkey listing, common output code 2013-04-21 11:05:20 +02:00
Mirek Kratochvil
86d3afc213 actions: list secrets 2013-04-21 10:52:02 +02:00
Mirek Kratochvil
9ead59dbad str_match: keyspec matching 2013-04-21 10:32:24 +02:00
Mirek Kratochvil
9e15bf25d2 str_match: algorithm name matching 2013-04-21 10:20:15 +02:00
Mirek Kratochvil
03cd5abd73 actions: gen_key 2013-04-21 10:00:51 +02:00
Mirek Kratochvil
2fb0392bb1 algos_sig: missing positive returns 2013-04-21 10:00:20 +02:00
Mirek Kratochvil
e1caed83a2 generator: getting really cosmetic 2013-04-21 09:59:55 +02:00
Mirek Kratochvil
b376232727 serialization: signed/encrypted messages 2013-04-21 00:31:40 +02:00
Mirek Kratochvil
236ec39579 sencode: string length integer bijectivity 2013-04-21 00:11:43 +02:00
Mirek Kratochvil
04b4b1670f keyring: keys also contain algorithm identifier 2013-04-21 00:04:16 +02:00
Mirek Kratochvil
b3a5fee318 main: use cleaner error output 2013-04-20 23:44:18 +02:00
Mirek Kratochvil
bb9640f6b7 keyring: remove race condition from unlocking 2013-04-20 23:43:37 +02:00
Mirek Kratochvil
c6278b8e54 keyring: pubring/secring identifiers 2013-04-20 23:43:04 +02:00
Mirek Kratochvil
fef4002138 iohelpers and output redirection 2013-04-20 23:08:09 +02:00
Mirek Kratochvil
d3b377179f main: links to actions 2013-04-20 22:39:51 +02:00
Mirek Kratochvil
83e0e3ad58 main: remove clearsign option
Clearsigning is how we do signatures by default now. Detached signature
file stays as an option. Having a PGP-like non-cleartext non-detached
file doesn't really look much useful and brings complexity. Axed.
2013-04-20 21:57:03 +02:00
Mirek Kratochvil
fe4e4e1ad1 actions: skeleton 2013-04-20 14:19:32 +02:00
Mirek Kratochvil
772df95f39 algo_suite: definition moved to a better place 2013-04-20 14:02:19 +02:00
Mirek Kratochvil
06c997deee some lib/header/autotools cleaning 2013-04-20 13:47:41 +02:00
Mirek Kratochvil
8e3fc91ccc main: option parsing 2013-04-20 11:58:28 +02:00
Mirek Kratochvil
0791433a4e envelope: correctly return parsed envelope type 2013-04-20 10:30:22 +02:00
Mirek Kratochvil
bf57a99fb2 sencode: a little better format of decode
It's not all that pointy anymore.
2013-04-20 10:09:11 +02:00
Mirek Kratochvil
6b96cc33e6 algo_suite: register all algorithms and enjoy them 2013-04-20 09:58:12 +02:00
Mirek Kratochvil
9731e41beb keyring: small clarifications 2013-04-20 09:57:18 +02:00
Mirek Kratochvil
19f00a49dd output helper macros 2013-04-20 09:49:20 +02:00
Mirek Kratochvil
1d7d1a1afb sencode: forgotten uint 2013-04-19 17:23:50 +02:00
Mirek Kratochvil
735b7add72 main: help display 2013-04-19 17:23:28 +02:00
Mirek Kratochvil
7f8e02a8aa sencode: ensure bijective int serialization 2013-04-19 12:45:28 +02:00
Mirek Kratochvil
765c553e97 sencode: ensure bijective bvector serialization 2013-04-19 12:28:15 +02:00
Mirek Kratochvil
645cdb96ee main: add short options for everything
otherwise it'd die typing all that long stuff anyway
2013-04-19 09:54:38 +02:00
Mirek Kratochvil
e5cff75177 keyring: detach keyring parsing/serialization
for later usage in exports/imports
2013-04-18 11:53:50 +02:00
Mirek Kratochvil
287a2bbac0 main: variables for params 2013-04-18 10:45:05 +02:00
Mirek Kratochvil
adb7a669b5 main: filled with possible options 2013-04-18 08:49:09 +02:00
Mirek Kratochvil
edca5b6cc5 envelope: fixed&working 2013-04-17 17:55:06 +02:00
Mirek Kratochvil
74e7e6226f envelope: impl 2013-04-17 17:14:08 +02:00
Mirek Kratochvil
4b844ffd20 envelope: skeleton 2013-04-17 14:28:24 +02:00
Mirek Kratochvil
3b2b3b7f00 main: forgotten styleup 2013-04-17 14:28:11 +02:00
Mirek Kratochvil
cff617f8a4 main: keyring initialization 2013-04-17 09:33:22 +02:00
Mirek Kratochvil
c62c19d29d header file ifndefs share common prefix 2013-04-17 08:52:22 +02:00
Mirek Kratochvil
1140daf08d envelope: empty files 2013-04-17 08:48:29 +02:00
Mirek Kratochvil
7d92cea733 keyring: open/close and lock management 2013-04-16 22:29:21 +02:00
Mirek Kratochvil
ad1065f847 keyring: some file stuff&loading/saving 2013-04-16 22:14:50 +02:00
Mirek Kratochvil
d3be589138 keyring: a little better structure 2013-04-15 16:00:26 +02:00
Mirek Kratochvil
5d4879a760 remove some uninteresting comments 2013-04-15 15:59:45 +02:00
Mirek Kratochvil
b3403d5c41 serialization: key identifier strings 2013-04-02 12:08:58 +02:00
Mirek Kratochvil
2c4a399536 keyring: better structure 2013-04-01 17:49:58 +02:00
Mirek Kratochvil
f6c1ee90c9 algos_sig: complete 2013-01-27 15:02:54 +01:00
Mirek Kratochvil
844bdac363 signatures: use ripemd128 instead of sha256half 2013-01-27 12:19:14 +01:00
Mirek Kratochvil
889970349e bvector: much faster unranking
from O(t*n) to O(t*log(n)) for given McE params.
2013-01-26 23:48:06 +01:00
Mirek Kratochvil
805df12176 algos_enc: works 2013-01-26 22:55:56 +01:00
Mirek Kratochvil
eadcfcf8b4 algos_sig: start signature algorithms 2013-01-21 17:00:20 +01:00
Mirek Kratochvil
7a48eff37a algos_enc: f-o decryption 2013-01-18 11:38:37 +01:00
Mirek Kratochvil
0f2db0b62c algos_enc: work, fujisaki-okamoto encryption 2013-01-17 16:31:34 +01:00
Mirek Kratochvil
0b487201ff algos_enc: padding fix
I have indeed heard that everyone always fucks this up and therefore
kindof hoped to make an exception. Lasted two minutes.
2013-01-17 12:08:40 +01:00
Mirek Kratochvil
c345408cc8 algos_enc: padding 2013-01-17 12:05:01 +01:00
Mirek Kratochvil
5f49e3aa39 algorithms: encryption algs work 2013-01-16 22:30:03 +01:00
Mirek Kratochvil
fea48c77b3 main: enhancement, minor stuff 2013-01-13 23:37:58 +01:00
Mirek Kratochvil
bbbd4bd8bd generator: be quicker by default 2013-01-13 23:27:21 +01:00
Mirek Kratochvil
e584947e65 base64: decoding 2013-01-13 23:27:07 +01:00
Mirek Kratochvil
49710e16be base64: break lines 2013-01-13 12:54:16 +01:00
Mirek Kratochvil
94af9472e8 base64: encoding 2013-01-11 12:31:57 +01:00
Mirek Kratochvil
59a0e24c67 main: basic option processing 2013-01-11 11:33:17 +01:00
Mirek Kratochvil
36cace8763 message: storing dirty privkey 2013-01-08 20:06:59 +01:00
Mirek Kratochvil
9346b63bdd message implementation 2013-01-08 00:13:19 +01:00
Mirek Kratochvil
db7a33fa4d base64 skeleton 2013-01-07 22:29:55 +01:00
Mirek Kratochvil
fa99f07b12 algorithm abstraction 2013-01-07 22:29:29 +01:00
Mirek Kratochvil
814c7642af keyring and message work 2013-01-04 12:43:36 +01:00
Mirek Kratochvil
be9acd4984 mce_qd: better parameter selection + fwht speed 2013-01-01 19:50:53 +01:00
Mirek Kratochvil
0e7b439f11 cosmetic fixes 2013-01-01 17:22:19 +01:00
Mirek Kratochvil
3af8bc98fb main: cleaned up 2012-12-29 20:40:47 +01:00
Mirek Kratochvil
d96be65940 sha2 hash functors 2012-12-29 20:35:42 +01:00
Mirek Kratochvil
07b4ee1953 fmtseq: drop heads of rc4 keystreams 2012-12-29 19:40:39 +01:00
Mirek Kratochvil
542d2f5e32 rc4-based random number generator with seeding 2012-12-29 19:40:14 +01:00
Mirek Kratochvil
bc759c2211 fmtseq: key serialization 2012-12-29 15:26:34 +01:00
Mirek Kratochvil
647f5e7fa3 fmtseq: all working 2012-12-28 17:14:22 +01:00
Mirek Kratochvil
902a2f541d fmtseq: working (tbd: tree cache updates) 2012-12-27 19:49:21 +01:00
Mirek Kratochvil
d4ba7793f2 arcfour: small speedup 2012-12-25 21:32:15 +01:00