Path: blob/main/crypto/krb5/src/plugins/preauth/spake/iana.h
34907 views
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */1/* plugins/preauth/spake/iana.h - SPAKE IANA registry contents */2/*3* Copyright (C) 2015 by the Massachusetts Institute of Technology.4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9*10* * Redistributions of source code must retain the above copyright11* notice, this list of conditions and the following disclaimer.12*13* * Redistributions in binary form must reproduce the above copyright14* notice, this list of conditions and the following disclaimer in15* the documentation and/or other materials provided with the16* distribution.17*18* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS19* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT20* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS21* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE22* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,23* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES24* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR25* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)26* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,27* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)28* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED29* OF THE POSSIBILITY OF SUCH DAMAGE.30*/3132#ifndef IANA_H33#define IANA_H3435#include <stdint.h>36#include <stddef.h>3738typedef enum {39SPAKE_SF_NONE = 1,40} spake_sf_type;4142typedef enum {43SPAKE_GROUP_EDWARDS25519 = 1,44SPAKE_GROUP_P256 = 2,45SPAKE_GROUP_P384 = 3,46SPAKE_GROUP_P521 = 4,47} spake_group;4849typedef struct {50int32_t id;51const char *name;52size_t mult_len;53size_t elem_len;54const uint8_t *m;55const uint8_t *n;56size_t hash_len;57} spake_iana;5859extern const spake_iana spake_iana_edwards25519;60extern const spake_iana spake_iana_p256;61extern const spake_iana spake_iana_p384;62extern const spake_iana spake_iana_p521;6364#endif /* IANA_H */656667