Skip to content

fix 32 bit support (ghash_ctmul: a ghash implementation from BearSSL that works on 32 bit LE platforms)#65

Merged
hannesm merged 2 commits into
mirage:masterfrom
hannesm:32
May 18, 2020
Merged

fix 32 bit support (ghash_ctmul: a ghash implementation from BearSSL that works on 32 bit LE platforms)#65
hannesm merged 2 commits into
mirage:masterfrom
hannesm:32

Conversation

@hannesm

@hannesm hannesm commented May 15, 2020

Copy link
Copy Markdown
Member

this should fix #60 //cc @TImada -- the ghash implementation is taken from BearSSL and permissively licensed

the tests are passing :)

there remaining issue is that we do not have a 32bit CI. I have tested this PR manually on a ocaml-variants.4.09.1+32bit switch on x86.

@hannesm hannesm mentioned this pull request May 15, 2020

@dinosaure dinosaure left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI is good but we should waiting a proper test from @TImada before to merge it.

@TImada

TImada commented May 15, 2020

Copy link
Copy Markdown

Many thanks!
I have just tried the commits and dune build was successful on my aarch32 machine.

However, opam install mirage-crypto-entropy failed ...
What I needed to install the mirage-crypto-entropy package was modification in mirage-crypto-entropy.opam:

available: [
-   arch = "arm" | arch = "x86_32" | arch = "x86_64" | arch = "arm64"
+   arch = "arm32" | arch = "x86_32" | arch = "x86_64" | arch = "arm64"
]

@hannesm

hannesm commented May 18, 2020

Copy link
Copy Markdown
Member Author

thanks for testing @TImada. I'll merge this now, and keep the 32bit CI in mind. The revision of the RNG in #64 avoid the arch = availability in opam

@hannesm hannesm merged commit 2ff0734 into mirage:master May 18, 2020
@dinosaure

Copy link
Copy Markdown
Member

I'll merge this now, and keep the 32bit CI in mind.

Currently in preparation with ocurrent/ocaml-ci#183.

hannesm added a commit to hannesm/opam-repository that referenced this pull request May 18, 2020
…0.7.0)

CHANGES:

* CPU feature detection (AESNI, SSE3, PCLMULQ) at runtime instead of compile
  time (mirage/mirage-crypto#53 @Julow, fixed MirageOS support mirage/mirage-crypto#61, review by @hannesm)
  performance hit up to 5%
* Revise entropy collection (mirage/mirage-crypto#64 @hannesm review by @dinosaure @cfcs)
  mirage-crypto-entropy has been folded into mirage-crypto-rng.{unix,lwt,mirage}
  - the RNG is no longer fork() safe, if you use fork in your code, be sure to
    reseed the RNG in the child process
  - on Unix and Lwt, the used RNG is Fortuna, seeded by getrandom(),
    rdrand/rdseed, and whirlwind
  - Mirage_crypto_rng_lwt does entropy collection for Lwt applications
  - entropy collection is now similar to FreeBSD:
    - rdrand/rdseed is executed in a separate task (by default every second)
    - on Unix, getrandom() is executed in another separate task (by default
      every 10 seconds)
    - on every enter of the Lwt event loop, some bits of rdtsc are collected
      (rdrand/rdseed is not on each even loop enter anymore)
  - Fortuna only uses entropy pools if the given period is exhausted (defaults
    to 1s), and the pool size exceeds 64 bytes
  - The unseeded generator exception prints instructions how to seed the RNG
* 32 bit support (for ghash), requested by @TImada in mirage/mirage-crypto#60, mirage/mirage-crypto#65 @hannesm
* use Eqaf_cstruct.find_uint8 instead of Cs.ct_find_uint8 (mirage/mirage-crypto#52 @dinosaure)
* add (:standard) in C flags to allow cross-compilation mirage/mirage-crypto#47 @samoht
* Mirage_crypto.Uncommon: remove several functions (Cs.create, Option),
  requires OCaml 4.08 (mirage/mirage-crypto#49 mirage/mirage-crypto#51 @hannesm)
* remove ocplib-endian dependency, use Bytes directly (since 4.07) mirage/mirage-crypto#51 @hannesm
* bitfn.h cleanup (mirage/mirage-crypto#56 mirage/mirage-crypto#58 @hannesm)
* fix build if opam is not available (mirage/mirage-crypto#66 @hannesm)
* update test.yml GitHub actions (mirage/mirage-crypto#44 mirage/mirage-crypto#57 @imbsky)
* Travis CI for arm64 (mirage/mirage-crypto#55 @hannesm)
@hannesm hannesm deleted the 32 branch February 28, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile errors on aarch32

3 participants