Commit Graph

37 Commits

Author SHA1 Message Date
Vincent Hanquez
daff858fe1 [number] cleanup in serialization 2015-06-01 13:03:21 +01:00
Vincent Hanquez
453e9a6f35 [number] internal serialize, unconditionally zero the buffer. 2015-06-01 13:02:53 +01:00
Vincent Hanquez
6028e95805 [number] cleanup 2015-06-01 11:50:24 +01:00
Vincent Hanquez
d873564c54 [number] split the serialization to support a more bit banging direct approach 2015-06-01 05:59:54 +01:00
Vincent Hanquez
0e048b77c4 [number] correct tweak function to mask things properly 2015-05-23 17:09:07 +01:00
Vincent Hanquez
e14d9cafc9 [number] add debugging in case of error 2015-05-23 16:28:50 +01:00
Vincent Hanquez
bc4a55ff74 [number] further cleanup random generation 2015-05-23 13:44:26 +01:00
Vincent Hanquez
c0e50547ad [number] remove the need for a random generator for testing primality
a DRG is implicitely created when calling the non gmp primality test
2015-05-23 12:55:29 +01:00
Vincent Hanquez
23b5146f0f [number] remove unnecessary random number generator 2015-05-23 12:02:05 +01:00
Vincent Hanquez
2153e5690f [number] generate number with bounds more effectively 2015-05-23 11:59:10 +01:00
Vincent Hanquez
05e0e1a587 [number] add helpers to get bits size ond bytes size
the later is already available as 'lengthBytes' in Serialize module
2015-05-23 09:16:36 +01:00
Vincent Hanquez
cddac096cd [number] rename generate into generateParams 2015-05-23 09:15:42 +01:00
Vincent Hanquez
27dacbfb21 add gmpSizeInBits 2015-05-23 09:15:15 +01:00
Vincent Hanquez
efedb38570 [number] add a new routine to generate random number 2015-05-22 21:36:13 +01:00
Vincent Hanquez
16839d3a43 [number] remove the ByteString from generation of high bits 2015-05-21 14:48:26 +01:00
Vincent Hanquez
881d167cb5 more fixing up description and comments 2015-05-20 06:22:00 +01:00
Vincent Hanquez
92343f856a add comments and description 2015-05-20 06:07:31 +01:00
Vincent Hanquez
d035e3a3bc [number] properly handle gmp 2015-05-11 11:39:09 +01:00
Vincent Hanquez
b3ebf3f3b8 [number] fix import 2015-05-11 10:07:15 +01:00
Vincent Hanquez
9567fa2526 [number] almost rewrite all serialization to be faster and less depends on random versions 2015-05-11 09:28:48 +01:00
Vincent Hanquez
228f1ab938 [number] further push the compat cleanup 2015-05-11 07:32:13 +01:00
Vincent Hanquez
8c07305deb [number] fix compat with a missing do. 2015-05-11 07:31:52 +01:00
Vincent Hanquez
ee3e5e69bf [number] move some number primitive to use compat without CPP 2015-05-11 07:11:38 +01:00
Vincent Hanquez
03fe63b05a [number] further remove gcde_binary 2015-05-11 07:10:52 +01:00
Vincent Hanquez
4bcf193a12 [number] further remove gcde_binary 2015-05-11 07:10:38 +01:00
Vincent Hanquez
47afc1720d [number] remove gcde_binary 2015-05-11 07:10:15 +01:00
Vincent Hanquez
5c0daae88c [number] add simple combinator 2015-05-11 07:09:44 +01:00
Vincent Hanquez
427541064d [number] add further gmp optional compat 2015-05-11 07:09:30 +01:00
Vincent Hanquez
ed8fbe8f69 [Number] add module to cleanup CPP around 2015-05-10 15:27:52 +01:00
Vincent Hanquez
28a4fa1503 remove unnecessary CPP 2015-05-03 14:31:07 +01:00
Vincent Hanquez
db7c3bbb4f [hash] massive overhaul of the hash interface
use the typeclass for the lowest IO impure C bindings definitions,
and define the pure interface as generic on top of this.

At the same time define an Hash.IO interface to allow mutable manipulations
of hash contextes when necessary.

Use HashAlgorithm instead of HashFunction in the [PubKey] sections

Tweak the HMAC, PBKDF2 functions to be more efficient and use the new interface
2015-04-30 06:18:07 +01:00
Vincent Hanquez
b487aef898 cleanup module imports 2015-04-20 07:36:51 +01:00
Vincent Hanquez
6eae9b0557 fix warnings 2015-04-05 12:19:26 +01:00
Vincent Hanquez
827407fbed use BinaryPolynomial when it is one in F2m 2015-04-03 08:17:47 +01:00
Vincent Hanquez
c3d9570881 re-add the primitives to generate primes and test for prime. 2015-03-29 10:55:46 +01:00
Vincent Hanquez
d9b16a529e re-enable number generation 2015-03-29 10:43:45 +01:00
Vincent Hanquez
90d02607ba merge crypto-numbers minus all the random parts 2015-02-09 05:47:11 +00:00