diff --git a/README.md b/README.md index b5487d3e4..b3409373a 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,14 @@ Falcon and SPHINCS+ have also been [selected for standardization](https://csrc.n All names other than `ML-KEM` and `ML-DSA` are subject to change. `liboqs` makes available a [selection mechanism for algorithms on the NIST standards track, continued NIST competition, or purely experimental nature by way of the configuration variable OQS_ALGS_ENABLED](CONFIGURE.md#oQS_ALGS_ENABLED). By default `liboqs` is built supporting all, incl. experimental, PQ algorithms listed below. +### KEMs +content + +### Digital signatures +content + +### Stateful digital signatures +content Note that for algorithms marked with a dagger (†), liboqs contains at least one implementation that uses a large amount of stack space; this may cause failures when run in threads or in constrained environments. For more information, consult the algorithm information sheets in the [docs/algorithms](https://github.com/open-quantum-safe/liboqs/tree/main/docs/algorithms) folder. diff --git a/scripts/update_docs_from_yaml.py b/scripts/update_docs_from_yaml.py index 83050c163..5ec96a21e 100755 --- a/scripts/update_docs_from_yaml.py +++ b/scripts/update_docs_from_yaml.py @@ -16,6 +16,38 @@ def file_get_contents(filename, encoding=None): with open(filename, mode='r', encoding=encoding) as fh: return fh.read() +def update_readme( + kem_yamls: list[dict], + sig_yamls: list[dict], + sig_stfl_yamls: list[dict], + liboqs_dir: str, +): + """Per liboqs/issues/2045, update README.md with an algorithm support table + """ + # TODO: construct KEM table + # TODO: construct SIG table + # TODO: construct SIG_STFL table + md_str = f"""### KEMs +content + +### Digital signatures +content + +### Stateful digital signatures +content +""" + readme_path = os.path.join(liboqs_dir, "README.md") + fragment_start = "\n" + fragment_end = "" + with open(readme_path, "r") as f: + readme = f.read() + fragment_start_loc = readme.find(fragment_start) + len(fragment_start) + fragment_end_loc = readme.find(fragment_end) + with open(readme_path, "w") as f: + f.write(readme[:fragment_start_loc]) + f.write(md_str) + f.write(readme[fragment_end_loc:]) + ######################################## # Update the KEM markdown documentation. ######################################## @@ -342,7 +374,7 @@ def do_it(liboqs_root): # TODO:construct the algorithm support table, replace the appropriate # section in README.md (OQS_TEMPLATE_FRAGMENT_ALG_SUPPORT_START) - + update_readme(kem_yamls, sig_yamls, sig_stfl_yamls, liboqs_root) if __name__ == "__main__":