-
Notifications
You must be signed in to change notification settings - Fork 1
/
ac-crypto-prim.cabal
150 lines (133 loc) · 4.22 KB
/
ac-crypto-prim.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Name: ac-crypto-prim
Version: 0.3.1
Synopsis: Pivotcloud Cryptographic Primitives Library
description:
Cryptographic Primitives:
.
* Elliptic curve operations: NIST, ED25519, Curve25519
.
* Signatures: ECDSA, EDDSA
.
* Symmetric encryption: AES, ChaCha, Salsa
.
* MAC: HMAC, Poly1305
.
* Hash: SHA2 family
.
* KDF: PBKDF2
Homepage: https://github.com/alephcloud/hs-ac-crypto-prim
License: Apache-2.0
License-file: LICENSE
Author: PivotCloud
Maintainer: [email protected]
Copyright: 2013-2015 PivotCloud, Inc
Category: Cryptography
Build-type: Simple
cabal-version: >=1.10
Extra-source-files:
cbits/*.h,
cbits/include/*.h,
cbits/*.c
source-repository head
type: git
location: https://github.com/alephcloud/hs-ac-crypto-prim
Flag native
description: build using native code (no openssl, no haste)
default: True
manual: True
Flag openssl
description: build with the openssl library linked in. need to select backend
default: True
manual: True
Flag haste
description: build using haste backend. not currently supported
default: False
manual: True
Flag curve25519
description: add support for curve 25519 DH
default: True
manual: True
Flag ed25519
description: add support for signature with curve25519
default: True
manual: True
Flag ecc_openssl
description: build ECC using openssl
default: True
manual: True
Library
exposed-modules:
PC.Crypto.Prim.Bn
PC.Crypto.Prim.Aes
PC.Crypto.Prim.Class
PC.Crypto.Prim.Ecc
PC.Crypto.Prim.Ecdsa
PC.Crypto.Prim.Ed25519
PC.Crypto.Prim.Sha
PC.Crypto.Prim.Hmac
PC.Crypto.Prim.Pbkdf2
PC.Crypto.Prim.P256
PC.Crypto.Prim.P521
PC.Crypto.Prim.Curve25519
PC.Crypto.Prim.ChaCha
PC.Crypto.Prim.Poly1305
PC.Crypto.Prim.SafeEq
other-modules:
PC.Crypto.Prim.Ecc.Key
PC.Crypto.Prim.Ecc.Ops
PC.Crypto.Prim.Imports
build-depends:
integer-gmp,
base >= 4.7 && < 5.0,
bytestring >= 0.10.0.2,
byteable >= 0.1.1,
deepseq >= 1.3,
securemem,
cryptohash >= 0.11.5,
cipher-aes >= 0.2.5,
transformers >= 0.3.0.0,
mtl,
crypto-random >= 0.0.7,
crypto-cipher-types >= 0.0.9,
acn >= 0.1.2.1,
pc-bytes >= 2015.4
default-language: Haskell2010
ghc-options: -Wall
if flag(native)
cpp-options: -DNATIVE
other-modules: PC.Crypto.Prim.Bn.Native
, PC.Crypto.Prim.Aes.Native
, PC.Crypto.Prim.Sha.Native
, PC.Crypto.Prim.Hmac.Native
if flag(openssl)
-- link with the C library if openssl is enabled
if os(mingw32) || os(windows)
extra-libraries: eay32, ssl32, wsock32
extra-lib-dirs: C:\OpenSSL-Win64\bin
C:\OpenSSL-Win64
CC-Options: -D MINGW32
include-dirs: C:\OpenSSL-Win64\include
else
extra-libraries: crypto, ssl
-- for testing on MAC, or with different openssl location:
-- extra-lib-dirs: /usr/local/Cellar/openssl/1.0.2/lib
-- include-dirs: /usr/local/Cellar/openssl/1.0.2/include/
cpp-options: -DECC_OPENSSL
other-modules: PC.Crypto.Prim.Ecc.OpenSSL
, PC.Crypto.Prim.Ecc.OpenSSLBind
, PC.Crypto.Prim.Aes.OpenSSL
if flag(curve25519)
other-modules: Crypto.DH.Curve25519
c-sources: cbits/curve25519.c
include-dirs: cbits cbits/include
if flag(ed25519)
other-modules: Crypto.Sign.Ed25519
c-sources: cbits/ed25519.c
include-dirs: cbits cbits/include
other-modules: Crypto.Cipher.Salsa
, Crypto.Cipher.ChaCha
, Crypto.MAC.Poly1305
, Crypto.KDF.PBKDF2
C-sources: cbits/cryptonite_chacha.c
, cbits/cryptonite_salsa.c
, cbits/cryptonite_poly1305.c