Skip to content

Commit

Permalink
[metanorma] Convert IETF to NIST formats, use metanorma site generate
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Sep 23, 2022
1 parent 4fc6b4e commit 05135b4
Show file tree
Hide file tree
Showing 79 changed files with 1,439 additions and 1,455 deletions.
90 changes: 52 additions & 38 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,67 @@ name: build-documents

on:
push:
branches: [ master ]
branches: [ master, main ]
pull_request:
types: [opened, synchronize, ready_for_review]

jobs:
build-docker:
runs-on: ubuntu-latest
container: docker://metanorma/mn:1.4.12
container:
image: ghcr.io/metanorma/metanorma-nist:latest
credentials:
username: metanorma-ci
password: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Install gems from local Gemfile
run: |
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/gemfile-to-bundle-add.sh | bash
- name: Build document in the Metanorma container
env:
LC_ALL: C.UTF-8
LANG: C.UTF-8
LANGUAGE: C.UTF-8
run: |
make clean all publish
working-directory: ./src
- uses: actions/upload-artifact@master
with:
name: documents
path: ./src/documents
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || github.token }}
submodules: true

- uses: actions/cache@v2
with:
path: /config/fonts
key: metanorma-nist-fonts
restore-keys: metanorma-nist-fonts

- uses: metanorma/metanorma-build-scripts/gh-rubygems-setup-action@main
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}

- uses: metanorma/metanorma-build-scripts/docker-gem-install@main

- uses: actions-mn/cli/site-gen@main
with:
agree-to-terms: true

- uses: actions/upload-artifact@v2
with:
name: site
path: site

deploy-gh-pages:
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build-docker
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@v1
with:
name: documents
- name: Deploy to GH Pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.GH_DEPLOY_KEY }}
publish_dir: documents
publish_branch: nist-pages
force_orphan: true
enable_jekyll: true
user_name: ${{ github.actor }}
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }}
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}"
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 0
- uses: actions/checkout@v2

- uses: actions/download-artifact@v1
with:
name: site

- uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.GH_DEPLOY_KEY }}
publish_dir: ./site
publish_branch: nist-pages
force_orphan: true
enable_jekyll: true
user_name: ${{ github.actor }}
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }}
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}"

- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ github.token }}
expire-in: 0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Gemfile.lock
*.js
documents/
*.abort
relaton/
47 changes: 47 additions & 0 deletions metanorma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
metanorma:
source:
files:
- src/draft-celi-acvp-conditioning-components.adoc
- src/draft-celi-acvp-eddsa.adoc
- src/draft-celi-acvp-kbkdf.adoc
- src/draft-celi-acvp-kdf-ansi-x942.adoc
- src/draft-celi-acvp-kdf-ansi-x963.adoc
- src/draft-celi-acvp-kdf-ikev1.adoc
- src/draft-celi-acvp-kdf-ikev2.adoc
- src/draft-celi-acvp-kdf-snmp.adoc
- src/draft-celi-acvp-kdf-srtp.adoc
- src/draft-celi-acvp-kdf-ssh.adoc
- src/draft-celi-acvp-kdf-tls.adoc
- src/draft-celi-acvp-kdf-tpm.adoc
- src/draft-celi-acvp-pbkdf.adoc
- src/draft-celi-acvp-rsa.adoc
- src/draft-celi-acvp-sha.adoc
- src/draft-celi-acvp-sha3.adoc
- src/draft-celi-acvp-symmetric.adoc
- src/draft-celi-acvp-xof.adoc
- src/draft-fussell-acvp-dsa.adoc
- src/draft-fussell-acvp-ecdsa.adoc
- src/draft-fussell-acvp-kas-ecc.adoc
- src/draft-fussell-acvp-kas-ffc.adoc
- src/draft-fussell-acvp-mac.adoc
- src/draft-fussell-acvp-spec.adoc
- src/draft-hammett-acvp-kas-ecc-sp800-56ar3.adoc
- src/draft-hammett-acvp-kas-ffc-sp800-56ar3.adoc
- src/draft-hammett-acvp-kas-ifc.adoc
- src/draft-hammett-acvp-kas-kc-sp800-56.adoc
- src/draft-hammett-acvp-kas-kdf-hkdf.adoc
- src/draft-hammett-acvp-kas-kdf-onestep.adoc
- src/draft-hammett-acvp-kas-kdf-onestepnocounter.adoc
- src/draft-hammett-acvp-kas-kdf-twostep.adoc
- src/draft-hammett-acvp-kas-ssc-ecc.adoc
- src/draft-hammett-acvp-kas-ssc-ffc.adoc
- src/draft-hammett-acvp-kas-ssc-ifc.adoc
- src/draft-hammett-acvp-kdf-tls-v1.3.adoc
- src/draft-hammett-acvp-safe-primes.adoc
- src/draft-vassilev-acvp-drbg.adoc
- src/draft-vassilev-acvp-iana.adoc

collection:
organization: "National Institute of Standards and Technology > Computer Security Division"
name: "Automated Cryptographic Validation Protocol"
1 change: 1 addition & 0 deletions src/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source "https://rubygems.org"

gem "metanorma-cli"
gem "metanorma-nist", source: "https://rubygems.pkg.github.com/metanorma"
23 changes: 0 additions & 23 deletions src/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion src/common/common-sections/00-abstract.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[#abstract]
[abstract]
== Abstract

This document defines the JSON schema for testing {spec-algorithm} implementations with the ACVP specification.
47 changes: 47 additions & 0 deletions src/common/common-sections/00-preface.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

.Reports on Computer Systems Technology
The Information Technology Laboratory (ITL) at the National Institute of
Standards and Technology (NIST) promotes the U.S. economy and public welfare by
providing technical leadership for the Nation's measurement and standards
infrastructure. ITL develops tests, test methods, reference data, proof of
concept implementations, and technical analyses to advance the development and
productive use of information technology. ITL's responsibilities include the
development of management, administrative, technical, and physical standards and
guidelines for the cost-effective security and privacy of other than national
security-related information in federal information systems. The Special
Publication 800-series reports on ITL's research, guidelines, and outreach
efforts in information system security, and its collaborative activities with
industry, government, and academic organizations.

[preface]
== Acknowledgements

This document is produced by the Security Testing, Validation and Measurement
group under the Automated Cryptographic Validation Testing (ACVT) program.

[preface]
== Audience

This document is intended for the users and developers of ACVP.

[executive-summary]
== Executive Summary

The Automated Crypto Validation Protocol (ACVP) defines a mechanism to
automatically verify the cryptographic implementation of a software or hardware
crypto module. The ACVP specification defines how a crypto module communicates
with an ACVP server, including crypto capabilities negotiation, session
management, authentication, vector processing and more. The ACVP specification
does not define algorithm specific JSON constructs for performing the crypto
validation. A series of ACVP sub-specifications define the constructs for
testing individual crypto algorithms. Each sub-specification addresses a
specific class of crypto algorithms. This sub-specification defines the JSON
constructs for testing {spec-algorithm} implementations using ACVP.

[preface]
== Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14 of <<RFC2119>> and
<<RFC8174>> when, and only when, they appear in all capitals, as shown here.
1 change: 1 addition & 0 deletions src/common/common-sections/06-test-vector-intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The test vector set JSON schema is a multi-level hierarchy that contains meta da
| mode | Mode defined in the capability exchange | string
| revision | Protocol test revision selected | string
| testGroups | Array of test groups containing test data, see <<tgjs>> | array

|===

An example of this would look like this
Expand Down
5 changes: 0 additions & 5 deletions src/common/common-sections/11-iana.adoc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
[[conventions]]
== Conventions

[.nonterm]
=== Notation conventions
[appendix]
== Terminology

The key words "*MUST*", "*MUST NOT*", "*REQUIRED*", "*SHALL*", "*SHALL NOT*", "*SHOULD*", "*SHOULD NOT*", "*RECOMMENDED*", "*NOT RECOMMENDED*", "*MAY*", and "*OPTIONAL*" in this document are to be interpreted as described in BCP 14 of <<RFC2119>> and <<RFC8174>> when, and only when, they appear in all capitals, as shown here.

=== Terms and Definitions

==== Prompt
=== Prompt

JSON sent from the server to the client describing the tests the client performs

==== Registration
=== Registration

The initial request from the client to the server describing the capabilities of one or several algorithm, mode and revision combinations

==== Response
=== Response

JSON sent from the client to the server in response to the prompt

==== Test Case
=== Test Case

An individual unit of work within a prompt or response

==== Test Group
=== Test Group

A collection of test cases that share similar properties within a prompt or response

==== Test Vector Set
=== Test Vector Set

A collection of test groups under a specific algorithm, mode, and revision

==== Validation
=== Validation

JSON sent from the server to the client that specifies the correctness of the response
7 changes: 7 additions & 0 deletions src/common/common-sections/96-abbrev.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

[appendix]
== Abbreviations and Acronyms

ACVP:: Automated Crypto Validation Protocol

JSON:: Javascript Object Notation
11 changes: 11 additions & 0 deletions src/common/common-sections/97-revision-history.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

[appendix]
== Revision History

[cols="a,a,a",options="header"]
|===
| Version | Release Date | Updates

| {revision} | {issued-date} | Initial Release

|===
5 changes: 0 additions & 5 deletions src/common/common-sections/99-acknowledgements.adoc

This file was deleted.

1 change: 0 additions & 1 deletion src/common/common-sections/99-references-acvp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[%bibitem]
[[ACVP]]
=== Automatic Cryptographic Validation Protocol
docid::
docid.id:: ACVP
contributor::
contributor.role:: author
Expand Down
24 changes: 24 additions & 0 deletions src/common/common-sections/99-references-acvpsubsym.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

[%bibitem]
[[sub-symmetric]]
=== ACVP Symmetric Algorithm JSON Specification
docid.id:: ACVP-Symmetric
contributor::
contributor.role:: author
contributor.person.name.initial:: C.
contributor.person.name.surname:: Celi
contributor.person.affiliation.organization.name:: National Institute of Standards and Technology
contributor.person.affiliation.organization.abbreviation:: NIST
contributor::
contributor.role:: author
contributor.person.name.initial:: R.
contributor.person.name.surname:: Hammett
contributor.person.affiliation.organization.name:: Huntington Ingalls Industries
contributor.person.affiliation.organization.abbreviation:: HII
contributor::
contributor.role:: publisher
contributor.organization.name:: National Institute of Standards and Technology
contributor.organization.abbreviation:: NIST
date::
date.type:: published
date.value:: 2020-12-10
18 changes: 18 additions & 0 deletions src/common/common-sections/99-references-cmacvs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

[%bibitem]
[[CMACVS]]
=== The CMAC Validation System (CMACVS)
docid.id:: NIST CMACVS
contributor::
contributor.role:: author
contributor.person.name.initial:: S. S.
contributor.person.name.surname:: Keller
contributor.person.affiliation.organization.name:: National Institute of Standards and Technology
contributor.person.affiliation.organization.abbreviation:: NIST
contributor::
contributor.role:: publisher
contributor.organization.name:: National Institute of Standards and Technology
contributor.organization.abbreviation:: NIST
date::
date.type:: published
date.value:: 2011
Loading

0 comments on commit 05135b4

Please sign in to comment.