Return to xmss_commons.c CVS log | Up to [local] / src / usr.bin / ssh |
File: [local] / src / usr.bin / ssh / xmss_commons.c (download)
Revision 1.1, Fri Feb 23 15:58:38 2018 UTC (6 years, 3 months ago) by markus
Add experimental support for PQC XMSS keys (Extended Hash-Based Signatures) The code is not compiled in by default (see WITH_XMSS in Makefile.inc) Joint work with stefan-lukas_gazdag at genua.eu See https://tools.ietf.org/html/draft-irtf-cfrg-xmss-hash-based-signatures-12 ok djm@ |
/* xmss_commons.c 20160722 Andreas Hülsing Joost Rijneveld Public domain. */ #include "xmss_commons.h" #include <stdlib.h> #include <stdio.h> #include <stdint.h> void to_byte(unsigned char *out, unsigned long long in, uint32_t bytes) { int32_t i; for (i = bytes-1; i >= 0; i--) { out[i] = in & 0xff; in = in >> 8; } } void hexdump(const unsigned char *a, size_t len) { size_t i; for (i = 0; i < len; i++) printf("%02x", a[i]); }