package rfc6287
OCRA (OATH Challenge-Response Algorithm) implementation in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
rfc6287-1.0.4.tbz
sha256=9c33a5cc8330a7557438f1ea2535128d992bbe175429b7d0f5c9f183acef6f66
sha512=6543f3f26d1b7475972591359b873a01fb79f923759b6d74b1317a6116d09a4cebdcad6b92276eb3a4271d043c048b8a42c676a91f8eb48244c89aff7b8c76d4
Description
OCaml implementation of RFC6287 OCRA (OATH Challenge-Response Algorithm) incl. RFC Errata ID: 3729
Published: 25 Mar 2020
README
rfc6287
OCaml implementation of RFC6287 OCRA (OATH Challenge-Response Algorithm) incl. RFC Errata ID: 3729
Documentation
API documentation is available online.
Notes on bisect and ounit tests
$ dune clean
$ BISECT_ENABLE=yes dune runtest
$ bisect-ppx-report html
$ # point browser to `pwd`/_coverage/index.html
Example usage
enable and build ocra-tool
$ dune clean
$ mv examples/dune.ignore examples/dune
$ dune build
create credential files for client and server (server has a counter window of 5)
$ S=OCRA-1:HOTP-SHA1-6:C-QN08-PSHA1
$ K=00112233445566778899aabbccddeeff00112233
$ P=1234
$ C=0
$ ./_build/default/examples/ocra_tool.exe init -f /tmp/client.ocra -s $S -k $K -p $P -c $C
$ ./_build/default/examples/ocra_tool.exe info -f /tmp/client.ocra
suite: OCRA-1:HOTP-SHA1-6:C-QN08-PSHA1
key: 0x00112233445566778899aabbccddeeff00112233
counter: 0x0
pinhash: 0x7110eda4d09e062aa5e4a390b0a572ac0d2c0220
$ ./_build/default/examples/ocra_tool.exe init -f /tmp/server.ocra -s $S -k $K -p $P -c $C -w 5
$ ./_build/default/examples/ocra_tool.exe info -f /tmp/server.ocra
suite: OCRA-1:HOTP-SHA1-6:C-QN08-PSHA1
key: 0x00112233445566778899aabbccddeeff00112233
counter: 0x0
pinhash: 0x7110eda4d09e062aa5e4a390b0a572ac0d2c0220
counter_window: 5
generate challenge (server), calculate response (client) and verify (server).
counter values in credential files have been incremented
$ Q=`./_build/default/examples/ocra_tool.exe challenge -f /tmp/server.ocra`
$ A=`./_build/default/examples/ocra_tool.exe response -f /tmp/client.ocra -q $Q`
$ ./_build/default/examples/ocra_tool.exe verify -f /tmp/server.ocra -q $Q -a $A
success
$ ./_build/default/examples/ocra_tool.exe info -f /tmp/server.ocra
suite: OCRA-1:HOTP-SHA1-6:C-QN08-PSHA1
key: 0x00112233445566778899aabbccddeeff00112233
counter: 0x1
pinhash: 0x7110eda4d09e062aa5e4a390b0a572ac0d2c0220
counter_window: 5
$ ./_build/default/examples/ocra_tool.exe info -f /tmp/client.ocra
suite: OCRA-1:HOTP-SHA1-6:C-QN08-PSHA1
key: 0x00112233445566778899aabbccddeeff00112233
counter: 0x1
pinhash: 0x7110eda4d09e062aa5e4a390b0a572ac0d2c0220
Dependencies (9)
- rresult
- hex
- astring
-
cstruct
>= "3.2.0" & < "6.1.0"
-
mirage-crypto-rng
< "1.0.0"
-
mirage-crypto-pk
< "1.0.0"
-
mirage-crypto
< "1.0.0"
-
dune
>= "1.1"
-
ocaml
>= "4.07.0"
Dev Dependencies (3)
-
bisect_ppx
dev & >= "1.3.0"
-
ounit
with-test
-
mirage-crypto-rng
with-test & < "0.11.0"
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page