Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/mupq/pqm4
20 May 2025, 20:23:35 UTC
  • Code
  • Branches (22)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/aimer
    • refs/heads/benchmarkupdate
    • refs/heads/biscuit
    • refs/heads/dependabot/submodules/libopencm3-201f5bc
    • refs/heads/efm32gg11b
    • refs/heads/faster-ml-dsa
    • refs/heads/gcc14.2
    • refs/heads/github-actions-test
    • refs/heads/haetae-fix
    • refs/heads/master
    • refs/heads/meds
    • refs/heads/mirith
    • refs/heads/mkannwischer-patch-1
    • refs/heads/openocdtcp
    • refs/heads/outoftree
    • refs/heads/remove-broken-symlinks
    • refs/heads/tuov
    • refs/remotes/amin/kyberintt
    • refs/tags/Round1
    • refs/tags/Round2
    • refs/tags/Round3
    • refs/tags/SignatureRound1
    No releases to show
  • d49b0d2
  • /
  • interface.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:87611ec3374670557658a0c71d225427f13e9823
origin badgedirectory badge Iframe embedding
swh:1:dir:d49b0d2d7d01aa8be862cc21dc47d19059e8593a
origin badgerevision badge
swh:1:rev:c32bcd017b202d418c9135e2df77be73a69044a0
origin badgesnapshot badge
swh:1:snp:b763fa748aac5f9c5bca50a623062cfe613a4e6d
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: c32bcd017b202d418c9135e2df77be73a69044a0 authored by Ko- on 15 June 2020, 18:45:45 UTC
Revert "clean up Makefile"
Tip revision: c32bcd0
interface.py
import subprocess

import serial

from mupq import mupq


class M4Settings(mupq.PlatformSettings):
    #: Specify folders to include
    scheme_folders = [  # mupq.PlatformSettings.scheme_folders + [
        ('pqm4', 'crypto_kem', ''),
        ('pqm4', 'crypto_sign', ''),
        ('mupq', 'mupq/crypto_kem', ''),
        ('mupq', 'mupq/crypto_sign', ''),
        ('pqclean', 'mupq/pqclean/crypto_kem', "PQCLEAN"),
        ('pqclean', 'mupq/pqclean/crypto_sign', "PQCLEAN"),
    ]

    #: List of dicts, in each dict specify (Scheme class) attributes of the
    #: scheme with values, if all attributes match the scheme is skipped.
    skip_list = (
        {'scheme': 'falcon-1024-tree', 'implementation': 'opt-leaktime'},
        {'scheme': 'falcon-1024-tree', 'implementation': 'opt-ct'},
        {'scheme': 'frodokem640aes', 'implementation': 'clean'},
        {'scheme': 'frodokem640aes', 'implementation': 'opt'},
        {'scheme': 'frodokem976aes', 'implementation': 'clean'},
        {'scheme': 'frodokem976aes', 'implementation': 'opt'},
        {'scheme': 'frodokem1344aes', 'implementation': 'clean'},
        {'scheme': 'frodokem1344aes', 'implementation': 'opt'},
        {'scheme': 'frodokem640shake', 'implementation': 'clean'},
        {'scheme': 'frodokem976shake', 'implementation': 'clean'},
        {'scheme': 'frodokem976shake', 'implementation': 'opt'},
        {'scheme': 'frodokem1344shake', 'implementation': 'clean'},
        {'scheme': 'frodokem1344shake', 'implementation': 'opt'},
        {'scheme': 'mqdss-48', 'implementation': 'clean'},
        {'scheme': 'mqdss-64', 'implementation': 'clean'},
        {'scheme': 'ledakemlt12', 'implementation': 'leaktime'},
        {'scheme': 'ledakemlt32', 'implementation': 'leaktime'},
        {'scheme': 'ledakemlt52', 'implementation': 'leaktime'},
        {'scheme': 'luov-79-76-341-chacha', 'implementation': 'ref'},
        {'scheme': 'luov-79-76-341-keccak', 'implementation': 'ref'},
        {'scheme': 'luov-7-83-283-chacha', 'implementation': 'ref'},
        {'scheme': 'luov-7-83-283-keccak', 'implementation': 'ref'},
        {'scheme': 'luov-7-110-374-chacha', 'implementation': 'ref'},
        {'scheme': 'luov-7-110-374-keccak', 'implementation': 'ref'},
        {'scheme': 'rainbowIa-classic', 'implementation': 'clean'},
        {'scheme': 'rainbowIa-cyclic', 'implementation': 'clean'},
        {'scheme': 'rainbowIa-cyclic-compressed', 'implementation': 'clean'},
        {'scheme': 'rainbowIIIc-classic', 'implementation': 'clean'},
        {'scheme': 'rainbowIIIc-cyclic', 'implementation': 'clean'},
        {'scheme': 'rainbowIIIc-cyclic-compressed', 'implementation': 'clean'},
        {'scheme': 'rainbowVc-classic', 'implementation': 'clean'},
        {'scheme': 'rainbowVc-cyclic', 'implementation': 'clean'},
        {'scheme': 'rainbowVc-cyclic-compressed', 'implementation': 'clean'},
        {'scheme': 'qtesla-p-I', 'implementation': 'clean'},
        {'scheme': 'qtesla-p-III', 'implementation': 'clean'},
        {'scheme': 'mceliece348864', 'implementation': 'clean'},
        {'scheme': 'mceliece348864f', 'implementation': 'clean'},
        {'scheme': 'mceliece460896', 'implementation': 'clean'},
        {'scheme': 'mceliece460896f', 'implementation': 'clean'},
        {'scheme': 'mceliece6688128', 'implementation': 'clean'},
        {'scheme': 'mceliece6688128f', 'implementation': 'clean'},
        {'scheme': 'mceliece6960119', 'implementation': 'clean'},
        {'scheme': 'mceliece6960119f', 'implementation': 'clean'},
        {'scheme': 'mceliece8192128', 'implementation': 'clean'},
        {'scheme': 'mceliece8192128f', 'implementation': 'clean'},
        {'scheme': 'mceliece348864', 'implementation': 'vec'},
        {'scheme': 'mceliece348864f', 'implementation': 'vec'},
        {'scheme': 'mceliece460896', 'implementation': 'vec'},
        {'scheme': 'mceliece460896f', 'implementation': 'vec'},
        {'scheme': 'mceliece6688128', 'implementation': 'vec'},
        {'scheme': 'mceliece6688128f', 'implementation': 'vec'},
        {'scheme': 'mceliece6960119', 'implementation': 'vec'},
        {'scheme': 'mceliece6960119f', 'implementation': 'vec'},
        {'scheme': 'mceliece8192128', 'implementation': 'vec'},
        {'scheme': 'mceliece8192128f', 'implementation': 'vec'},
        {'scheme': 'hqc-128-1-cca2', 'implementation': 'leaktime'},
        {'scheme': 'hqc-192-1-cca2', 'implementation': 'leaktime'},
        {'scheme': 'hqc-192-2-cca2', 'implementation': 'leaktime'},
        {'scheme': 'hqc-256-1-cca2', 'implementation': 'leaktime'},
        {'scheme': 'hqc-256-2-cca2', 'implementation': 'leaktime'},
        {'scheme': 'hqc-256-3-cca2', 'implementation': 'leaktime'},
        {'scheme': 'rqc256', 'implementation': 'ref'},
    )


class M4(mupq.Platform):

    def __enter__(self):
        self._dev = serial.Serial("/dev/ttyUSB0", 115200, timeout=10)
        return super().__enter__()

    def __exit__(self,*args, **kwargs):
        self._dev.close()
        return super().__exit__(*args, **kwargs)

    def device(self):
        return self._dev

    def flash(self, binary_path):
        super().flash(binary_path)
        subprocess.check_call(
            ["st-flash", "--reset", "write", binary_path, "0x8000000"],
            stdout=subprocess.DEVNULL,
            stderr=subprocess.DEVNULL
        )

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top