Guest93649 has quit [Remote host closed the connection]
Haudegen has joined #mirage
Haudegen has quit [Remote host closed the connection]
Haudegen has joined #mirage
<kakekongen>
What's the status regarding ctypes in Mirage (hvt in particular)? I get a buttload of undefined references.
<kakekongen>
It compiles properly with the unix target, but not with the hvt target
<hannes>
kakekongen: AFAIK nobody has really invested the work to get ctypes running with MirageOS. it's not clear to me what the benefit would be in any case, given that there's no libc in a MirageOS unikernel..
<hannes>
this means that all C bindings need to be carefully crafted under the assumption that no symbols are around.. (well, maybe memcmp and memmove)..
<kakekongen>
The issue is my wanting to use the argon2 library for password hashing.
<kakekongen>
In other words, I would be better off using a different library for that purpose? Like something from digestif?
<hannes>
yes, well, or you (a) implement argon2 in ocaml (b) find an argon implementation that doesn't use many external (libc) functions, and interface it manually. intuitively I'd try (b) for 2 hours
<hannes>
(and yes, argon2 would be nice to have mirageos-ready)
<h01ger>
hannes: thanks for your mail. will act on it until friday. still typing little (but more than the last 3 weeks...)
<kakekongen>
Ahh, yeah. I am looking at the scrypt-kdf atm. Would be really interesting to make argon2 mirage-ready, but for me that would be a project I would do during weekends, so I think I'll stick to scrypt atm
<kakekongen>
What is required for a library to run under MirageOS hannes?
<hannes>
kakekongen: as mentioned, a pure OCaml version would work out of the box :)
<kakekongen>
For C backends, what would be the requirements for that part?
<hannes>
if you want to interface C code, as you mentioned earlier - there's no ctypes support - which means you've to manually bind the API.
<kakekongen>
Ahh, that was exactly what I was looking for, thanks! :)
<hannes>
if libargon2.so does only use these functions, it should work out of the box. if they use more libc functions, you'll have to either integrate them into the binding (or ocaml-freestanding -- but i'm pretty against including more C functions there ;) (though i may be convinced))
<kakekongen>
Nice to know ;)
<hannes>
it's morally "whatever OCaml runtime really needs" (vs what we've in include, which has lots of stubbed out functions that are only required as symbols, but are never called)
<hannes>
plus some functions to get gmp compiling..
<kakekongen>
Anyone have used scrypt-kdf with hvt as backend? I get "undefined reference to `caml_salsa_core`" when compiling. It works as a charm for the unix backend. Any ideas?
mort___ has quit [Ping timeout: 250 seconds]
Haudegen has quit [Remote host closed the connection]
<hannes>
kakekongen: I suspect some cross-compile issues need to be sorted for salsa20-core then... depending on the build system (ocamlbuild/topkg -> nocrypto; dune -> checkseum)... since all the C code for MirageOS needs to be built with above mentioned includes and C library (rather than system libc) -- I can have a look at some point this week.
Haudegen has joined #mirage
pie__ has quit [Ping timeout: 250 seconds]
jnavila has joined #mirage
jnavila has quit [Ping timeout: 246 seconds]
jnavila has joined #mirage
jnavila has quit [Ping timeout: 258 seconds]
djs55 has joined #mirage
jnavila has joined #mirage
djs55 has quit [Quit: Leaving.]
djs55 has joined #mirage
djs55 has quit [Quit: Leaving.]
jnavila has quit [Quit: Konversation terminated!]
jnavila has joined #mirage
jnavila has quit [Ping timeout: 246 seconds]
jnavila has joined #mirage
Haudegen has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
Haudegen has joined #mirage
Haudegen has quit [Remote host closed the connection]