-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
148 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,15 @@ _build | |
*.install | ||
*.native | ||
*.byte | ||
.merlin | ||
|
||
*~ | ||
\.\#* | ||
\#*# | ||
|
||
gmon.out | ||
.gdb_history | ||
*.prof | ||
perf.data* | ||
*.json | ||
rondom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(executables | ||
(names speed) | ||
(modules speed) | ||
(libraries nocrypto)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
let flags = [ | ||
"--std=c99"; "-Wall"; "-Wextra"; "-O3"; | ||
"-D_DEFAULT_SOURCE"; | ||
"-Wno-implicit-fallthrough"; | ||
] | ||
|
||
let accelenv = "NOCRYPTO_ACCELERATE" | ||
let accelflags = ["-DACCELERATE"; "-mssse3"; "-maes"; "-mpclmul"] | ||
let accelneeds = [`SSSE3; `AES; `PCLMULQDQ] | ||
|
||
let accel = | ||
let auto = match Cpuid.supports accelneeds with | ||
Ok true -> accelflags | _ -> [] in | ||
match Sys.getenv accelenv with | ||
"true" -> Format.printf "Forcing acceleration ON.\n"; accelflags | ||
| "false" -> Format.printf "Forcing acceleration OFF.\n"; [] | ||
| _ -> auto | ||
| exception Not_found -> auto | ||
|
||
module C = Configurator.V1 | ||
|
||
let output = ref "" | ||
let args = ["-file", Arg.Set_string output, " FILE to dump flags"] | ||
let () = C.main ~name:"name" ~args @@ fun _ -> | ||
C.Flags.write_sexp !output (flags @ accel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(executables | ||
(names cfg) | ||
(libraries dune.configurator result cpuid)) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(lang dune 1.7) | ||
(name nocrypto) | ||
(version %%VERSION_NUM%%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(library | ||
(name nocrypto_entropy_lwt) | ||
(public_name nocrypto.lwt) | ||
(synopsis "Unix+Lwt entropy seeding") | ||
(libraries nocrypto nocrypto.unix lwt.unix) | ||
(optional)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(library | ||
(name nocrypto_entropy_mirage) | ||
(public_name nocrypto.mirage) | ||
(synopsis "Mirage entropy seeding") | ||
(libraries nocrypto lwt mirage-entropy) | ||
(optional)) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
opam-version: "2.0" | ||
homepage: "https://github.com/mirleft/ocaml-nocrypto" | ||
dev-repo: "git+https://github.com/mirleft/ocaml-nocrypto.git" | ||
bug-reports: "https://github.com/mirleft/ocaml-nocrypto/issues" | ||
doc: "https://mirleft.github.io/ocaml-nocrypto/doc" | ||
authors: ["David Kaloper <[email protected]>"] | ||
maintainer: "David Kaloper <[email protected]>" | ||
license: "ISC" | ||
synopsis: "Simple crypto for the modern age" | ||
|
||
build: [ ["dune" "subst"] {pinned} | ||
["dune" "build" "-p" name "-j" jobs ] | ||
["dune" "runtest"] {with-test} ] | ||
|
||
depends: [ | ||
"ocaml" {>= "4.03.0"} | ||
"dune" {build & >= "1.7"} | ||
"cpuid" {build} | ||
"ounit" {with-test} | ||
"cstruct" {>="3.0.0"} | ||
"ocplib-endian" | ||
"zarith" | ||
("mirage-no-xen" | ("mirage-xen" & "zarith-xen")) | ||
("mirage-no-solo5" | ("mirage-solo5" & "zarith-freestanding")) | ||
] | ||
|
||
depopts: [ "unix" "lwt" "mirage-entropy" ] | ||
|
||
conflicts: [ "mirage-xen" {< "2.2.0"} ] |
Oops, something went wrong.