summaryrefslogtreecommitdiff
path: root/ExperimentalCruft.hs
diff options
context:
space:
mode:
Diffstat (limited to 'ExperimentalCruft.hs')
-rw-r--r--ExperimentalCruft.hs34
1 files changed, 34 insertions, 0 deletions
diff --git a/ExperimentalCruft.hs b/ExperimentalCruft.hs
index e3c9941..68f82d2 100644
--- a/ExperimentalCruft.hs
+++ b/ExperimentalCruft.hs
@@ -256,4 +256,38 @@ fmapWithRT g (MultiPass p kk) = MultiPass p (fmapWithRT g' kk)
256 where g' rt h = g rt . h 256 where g' rt h = g rt . h
257-} 257-}
258 258
259{-
260 -- This code is written for the hecc package.
261applyCurve curve x = x*x*x + x*a + b where (a,b)=(geta curve,getb curve)
262
263secp256k1_oid = [1,3,132,0,10]
264secp256k1_curve = ECi l a b p r
265 where
266 -- y² = x³ + 7 (mod p)
267 p = 0x0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F
268 a = 0
269 b = 7
270 -- group order (also order of base point G)
271 r = n
272 n = 0x0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
273 -- cofactor
274 h = 1
275 -- bit length
276 l = 256
277
278secp256k1_G = ECPa secp256k1_curve
279 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798
280 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8
281 {-
282 The base point G in compressed form is:
283
284 G = 02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798
285
286 and in uncompressed form is:
287
288 G = 04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798
289 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8
290 -}
291-}
292
259 293