]> git.codecow.com Git - Monocypher.git/commit
Documentation overhaul
authorLoup Vaillant <loup@loup-vaillant.fr>
Thu, 26 Jan 2023 21:47:48 +0000 (22:47 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Thu, 26 Jan 2023 21:47:48 +0000 (22:47 +0100)
commit85a7c3742f06ab55fdf523a7a6a9cfe5cda09837
tree2f93efbb55c05774bcf3140799120c121ca1f364
parent9a49a3d3f9aee8cf87595bf498ed7021d947d5d6
Documentation overhaul

The API was broken left and right, and the documentation had to be
updated to reflect it.  In the process, I decided to go slightly above
and beyond.

The documentation is rather daunting.  One problem I had with it was the
sheer number of pages to navigate.  On top of that the optional and
advanced section didn't help.  So I made a number of changes:

* I'm sick of having to update symbolic links, so I removed them all.
  Instead they're generated as part of the documentation generation
  process.

* I collapsed the advanced and optional section into the main folder.

  Monocypher is a low-level library, so in practice even part of the
  main API is advanced.  Let's stop being shy about it and document
  everything at the same level.

  The optional part costs almost nothing on systems that can
  meaningfully use the makefile.  It is now included by default.

* I organised all function name around the `crypto_<section>_*()` naming
  scheme, and each section gets exactly one man page.  This gives us 13
  sections, 13 corresponding man pages, plus `intro.3monocypher`.

  One unfortunate consequence is that some of the man pages grew extra
  sections for the advanced functions that were bolted on there.  I'm
  not exactly sure how we should tackle them. Still, I think this is a
  win overall: those fewer man pages are still easier to navigate, and I
  don't think the advanced stuff really hurt the readability of the man
  pages they were inserted in.

This automation is a first step towards solving #250.
The next step should be to automate some cross verification:

- Compare the header files and the man pages, spot any missing
  functions.  Maybe also control arguments.
- Control that all .Fo and .Fn macros list the same functions.
- Control that no cross link (.Xr) is dead.
- Control that no function name (.Fn) isn't declared in the header.
  (except in the HISTORY section).  Maybe also do the same for
  arguments.
55 files changed:
.gitignore
doc/crypto_aead_lock.3monocypher [moved from doc/man/man3/crypto_aead_lock.3monocypher with 98% similarity]
doc/crypto_argon2.3monocypher [moved from doc/man/man3/crypto_argon2.3monocypher with 100% similarity]
doc/crypto_blake2b.3monocypher [moved from doc/man/man3/crypto_blake2b.3monocypher with 100% similarity]
doc/crypto_chacha20_djb.3monocypher [moved from doc/man/man3/advanced/crypto_chacha20.3monocypher with 80% similarity]
doc/crypto_ed25519_sign.3monocypher [moved from doc/man/man3/optional/crypto_ed25519_sign.3monocypher with 81% similarity]
doc/crypto_eddsa_sign.3monocypher [moved from doc/man/man3/crypto_sign.3monocypher with 54% similarity]
doc/crypto_elligator_map.3monocypher [moved from doc/man/man3/advanced/crypto_curve_to_hidden.3monocypher with 91% similarity]
doc/crypto_hmac_sha512.3monocypher [moved from doc/man/man3/optional/crypto_hmac_sha512.3monocypher with 100% similarity]
doc/crypto_poly1305.3monocypher [moved from doc/man/man3/advanced/crypto_poly1305.3monocypher with 100% similarity]
doc/crypto_sha512.3monocypher [moved from doc/man/man3/optional/crypto_sha512.3monocypher with 100% similarity]
doc/crypto_verify16.3monocypher [moved from doc/man/man3/crypto_verify16.3monocypher with 100% similarity]
doc/crypto_wipe.3monocypher [moved from doc/man/man3/crypto_wipe.3monocypher with 100% similarity]
doc/crypto_x25519.3monocypher [moved from doc/man/man3/crypto_x25519.3monocypher with 64% similarity]
doc/gen_doc.sh [new file with mode: 0755]
doc/intro.3monocypher [moved from doc/man/man3/intro.3monocypher with 100% similarity]
doc/man/man3/advanced/crypto_chacha20_h.3monocypher [deleted file]
doc/man/man3/advanced/crypto_eddsa_to_x25519.3monocypher [deleted file]
doc/man/man3/advanced/crypto_hidden_key_pair.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_hidden_to_curve.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_ietf_chacha20.3monocypher [deleted file]
doc/man/man3/advanced/crypto_ietf_chacha20_ctr.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_poly1305_final.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_poly1305_init.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_poly1305_update.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_x25519_dirty_fast.3monocypher [deleted file]
doc/man/man3/advanced/crypto_x25519_dirty_small.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_x25519_inverse.3monocypher [deleted file]
doc/man/man3/advanced/crypto_x25519_to_eddsa.3monocypher [deleted symlink]
doc/man/man3/advanced/crypto_xchacha20.3monocypher [deleted symlink]
doc/man/man3/crypto_aead_init_djb.3monocypher [deleted symlink]
doc/man/man3/crypto_aead_init_ietf.3monocypher [deleted symlink]
doc/man/man3/crypto_aead_read.3monocypher [deleted symlink]
doc/man/man3/crypto_aead_unlock.3monocypher [deleted symlink]
doc/man/man3/crypto_aead_write.3monocypher [deleted symlink]
doc/man/man3/crypto_blake2b_final.3monocypher [deleted symlink]
doc/man/man3/crypto_blake2b_init.3monocypher [deleted symlink]
doc/man/man3/crypto_blake2b_update.3monocypher [deleted symlink]
doc/man/man3/crypto_check.3monocypher [deleted symlink]
doc/man/man3/crypto_sign_public_key.3monocypher [deleted symlink]
doc/man/man3/crypto_verify32.3monocypher [deleted symlink]
doc/man/man3/crypto_verify64.3monocypher [deleted symlink]
doc/man/man3/crypto_x25519_public_key.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_ed25519_check.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_ed25519_public_key.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_hmac_sha512_final.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_hmac_sha512_init.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_hmac_sha512_update.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_sha512_final.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_sha512_init.3monocypher [deleted symlink]
doc/man/man3/optional/crypto_sha512_update.3monocypher [deleted symlink]
doc/man2html.sh [deleted file]
makefile
src/monocypher.c
src/monocypher.h