-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specification document - LaTeX to Asciidoc conversion #89
Comments
In answer to your open question about whether to have a monolithic document or to break it into sections, I recommend chapter-sized chunks. The chapter-sized chunks can be grouped into sections, and all can be included in a book header file. You can find an example at https://github.com/riscv/docs-templates. Right now some specifics are subject to change and there is a bug with respect to the use of wavedrom diagramming for which we might need to provide a temporary workaround. |
- See #89 - Added basic skelecton of the asciidoc specification, and can build it with asciidoctor. Based on riscv/doc-templates. On branch dev/next-release Your branch is up-to-date with 'origin/dev/next-release'. Changes to be committed: new file: .gitignore new file: Makefile new file: images/risc-v_logo.png new file: riscv-crypto-scalar-aes.adoc new file: riscv-crypto-scalar-appx-encodings.adoc new file: riscv-crypto-scalar-appx-entropy-source.adoc new file: riscv-crypto-scalar-appx-materials.adoc new file: riscv-crypto-scalar-appx-sail.adoc new file: riscv-crypto-scalar-bibliography.adoc new file: riscv-crypto-scalar-entropy-source.adoc new file: riscv-crypto-scalar-introduction.adoc new file: riscv-crypto-scalar-preface.adoc new file: riscv-crypto-scalar-profiles.adoc new file: riscv-crypto-scalar-sail-specifications.adoc new file: riscv-crypto-scalar-sha2.adoc new file: riscv-crypto-scalar-sm3.adoc new file: riscv-crypto-scalar-sm4.adoc new file: riscv-crypto-scalar-zkb.adoc new file: riscv-crypto-scalar-zkt.adoc new file: riscv-crypto-spec-scalar.adoc Changes not staged for commit: modified: ../../extern/riscv-gnu-toolchain (modified content) modified: ../../extern/riscv-isa-sim (untracked content) modified: ../../extern/sail-riscv (untracked content)
On branch dev/next-release Your branch is up-to-date with 'origin/dev/next-release'. Changes to be committed: modified: riscv-crypto-scalar-introduction.adoc modified: riscv-crypto-scalar-sail-specifications.adoc Changes not staged for commit: modified: ../../extern/riscv-gnu-toolchain (modified content) modified: ../../extern/riscv-isa-sim (untracked content) modified: ../../extern/sail-riscv (untracked content)
On branch dev/next-release Your branch is up-to-date with 'origin/dev/next-release'. Changes to be committed: new file: riscv-crypto-scalar-audience.adoc new file: riscv-crypto-scalar-policies.adoc modified: riscv-crypto-spec-scalar.adoc
On branch dev/next-release Your branch is up-to-date with 'origin/dev/next-release'. Changes to be committed: modified: riscv-crypto-scalar-profiles.adoc Changes not staged for commit: modified: ../../extern/riscv-gnu-toolchain (modified content) modified: ../../extern/riscv-isa-sim (untracked content) modified: ../../extern/sail-riscv (untracked content)
Hi @elisa-riscv I've made a start translating some parts of the specification which are very stable just to try things out. Your template repository and guide have been extremely helpful! The asciidoc source so far can be seen here and I've attached a working copy to this comment (riscv-crypto-spec-scalar.pdf). Without wanting to take up too much of your time, I hope I'm going in the right direction? Cheers, |
HI Ben,
Definitely you are going in the right direction. I am glad that you've got
a build working for you and are on your way.
Just a couple of quick comments, after a quick look:
- the pdf to which you pointed does *not* make use of the fonts and styles
that I provided. I can imagine that you want to test that your conversion
builds in the default pdf first--a good idea--but at some point you'll want
to ensure that the customized look and feel builds properly.
- I'm not certain about your heading use, because in general I am expecting
that topics start with a heading 1, indicated by `==`, but some document
structure and conventions are still under discussion.
Do let me know if you run into any issues.
I'm thinking that I should put together a checklist for people to use as
they go through the conversion process.
- Elisa
…On Wed, Apr 28, 2021 at 7:29 AM Ben Marshall ***@***.***> wrote:
Hi @elisa-riscv <https://github.com/elisa-riscv>
I've made a start translating some parts of the specification which are
very stable just to try things out. Your template repository and guide have
been extremely helpful!
The asciidoc source so far can be seen here
<https://github.com/riscv/riscv-crypto/tree/dev/next-release/doc/adoc-scalar>
and I've attached a working copy to this comment (
riscv-crypto-spec-scalar.pdf
<https://github.com/riscv/riscv-crypto/files/6392560/riscv-crypto-spec-scalar.pdf>).
Without wanting to take up too much of your time, I hope I'm going in the
right direction?
Cheers,
Ben
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASTDNURHYY5F3DKE2ONGG53TLALUJANCNFSM43KQ66AQ>
.
|
On branch dev/next-release Your branch is up-to-date with 'origin/dev/next-release'. Changes to be committed: modified: riscv-crypto-scalar-zkb.adoc Changes not staged for commit: modified: ../../extern/riscv-docs-templates (modified content) modified: ../../extern/riscv-gnu-toolchain (modified content) modified: ../../extern/riscv-isa-sim (untracked content) modified: ../../extern/sail-riscv (untracked content)
- Changed layout and organisation to match bitmanip based on how the wind is blowing. On branch dev/next-release Your branch is up-to-date with 'origin/dev/next-release'. Changes to be committed: new file: insns/aes32dsi.adoc new file: insns/aes32dsmi.adoc new file: insns/aes32esi.adoc new file: insns/aes32esmi.adoc new file: insns/aes64ds.adoc new file: insns/aes64dsm.adoc new file: insns/aes64es.adoc new file: insns/aes64esm.adoc new file: insns/aes64im.adoc new file: insns/aes64ks1i.adoc new file: insns/aes64ks2.adoc new file: insns/sha256sig0.adoc new file: insns/sha256sig1.adoc new file: insns/sha256sum0.adoc new file: insns/sha256sum1.adoc new file: insns/sha512sig0.adoc new file: insns/sha512sig0h.adoc new file: insns/sha512sig0l.adoc new file: insns/sha512sig1.adoc new file: insns/sha512sig1h.adoc new file: insns/sha512sig1l.adoc new file: insns/sha512sum0.adoc new file: insns/sha512sum0r.adoc new file: insns/sha512sum1.adoc new file: insns/sha512sum1r.adoc new file: insns/sm3p0.adoc new file: insns/sm3p1.adoc new file: insns/sm4ed.adoc new file: insns/sm4ks.adoc deleted: riscv-crypto-scalar-aes32.adoc deleted: riscv-crypto-scalar-aes64.adoc modified: riscv-crypto-scalar-profiles.adoc deleted: riscv-crypto-scalar-sha256.adoc deleted: riscv-crypto-scalar-sha512-rv32.adoc deleted: riscv-crypto-scalar-sha512-rv64.adoc deleted: riscv-crypto-scalar-sm3.adoc deleted: riscv-crypto-scalar-sm4.adoc modified: riscv-crypto-scalar-zkt.adoc modified: riscv-crypto-spec-scalar.adoc modified: ../../extern/sail-riscv Changes not staged for commit: modified: ../../extern/riscv-docs-templates (modified content) modified: ../../extern/riscv-gnu-toolchain (modified content) modified: ../../extern/riscv-isa-sim (untracked content) modified: ../../extern/sail-riscv (untracked content)
Closed with release v0.9.1 |
The specification needs to be converted from LaTeX to asciidoc, specifically the asciidoctor tool. This issue tries to capture what needs to happen.
What needs converting?
All of the LaTeX files under
doc/spec/tex
. Starting with thescalar
and files shared between specifications, but moving onto the vector spec.How will it be converted:
We can use Pandoc to bulk convert the files automatically, but there are several important gottchas while will need manual or semi-automatic fixing:
We have an extensive bibliography, particularly for the Entropy Source which should be preserved. Asciidoc does not have such a powerful bibliography system as LaTeX, but there is a standard way to do it described here. There is also a WiP script (
bin/bibtex-to-asciidoc.py
) to automatically convert the bibtex citations to the asciidoc format.Pandoc does not convert the latex
\cite{X}
macro into an asciidoc reference. The entire citation simply disappears from the output. This will either need to be fixed manually, or semi-scripted to be fixed.We currently inline the Sail code describing the functionality of our instructions into the specification, by sourcing from the Sail files directly. Pandoc is smart enough to extract the right parts of the source code in its automatically converted output. However, this will need to be manually maintained whenever the Sail code is updated, unless an automated solution exists / can be found.
Pandoc mangles anything in the verbatim-esq
cryptoise
environment. This can be manually fixed. It's just for showing assembly syntax.Edited to add: It looks like there's a great set of templates/examples here
Open Questions:
It's not clear how to represent the encodings? We can generate these tables if need be, as is currently done for the LaTeX, though it would be good if there was a standard way to do this.
We currently have one monolithic specification document, which works really well as a "single source" for people to look at. It's likely that this will be split into separate components:
ZKb
section, which is just a list of instructions from the Bitmanip extension which are useful for Scalar Cryptography, along with some rationale.ZKt
proposal, which is orthogonal to the rest of the spec, and adds constant time guarantees to listed instructions. It is already in asciidoc, and is maintained here. It will eventually be moved into this repository.It's not entirely clear whether these should be distributed as a single document, or maintained as separate files but combined into one monolithic document, as is currently done with the LaTeX sources. In any case, all of them will need to be versioned.
It's not clear how our specification will be integrated into the main specification. We want to do our conversion to asciidoc so as to minimise the effort it takes to integrate into the final specification.
Progress
Shared files:
Scalar Crypto:
ZKb instruction group:
Entropy Source:
Vector:
These are not a priority right now, we are focusing on the scalar crypto work.
The text was updated successfully, but these errors were encountered: