Annotation of embedaddon/strongswan/src/libstrongswan/plugins/bliss/bliss_signature.h, revision 1.1

1.1     ! misho       1: /*
        !             2:  * Copyright (C) 2014 Andreas Steffen
        !             3:  * HSR Hochschule fuer Technik Rapperswil
        !             4:  *
        !             5:  * This program is free software; you can redistribute it and/or modify it
        !             6:  * under the terms of the GNU General Public License as published by the
        !             7:  * Free Software Foundation; either version 2 of the License, or (at your
        !             8:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
        !             9:  *
        !            10:  * This program is distributed in the hope that it will be useful, but
        !            11:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
        !            12:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        !            13:  * for more details.
        !            14:  */
        !            15: 
        !            16: /**
        !            17:  * @defgroup bliss_signature bliss_signature
        !            18:  * @{ @ingroup bliss_p
        !            19:  */
        !            20: 
        !            21: #ifndef BLISS_SIGNATURE_H_
        !            22: #define BLISS_SIGNATURE_H_
        !            23: 
        !            24: typedef struct bliss_signature_t bliss_signature_t;
        !            25: 
        !            26: #include "bliss_param_set.h"
        !            27: 
        !            28: #include <library.h>
        !            29: 
        !            30: /**
        !            31:  * Public interface of BLISS signature object
        !            32:  */
        !            33: struct bliss_signature_t {
        !            34: 
        !            35:        /**
        !            36:         * Get compressed binary encoding of BLISS signature
        !            37:         *
        !            38:         * @result                      binary encoding of BLISS signature
        !            39:         */
        !            40:        chunk_t (*get_encoding)(bliss_signature_t *this);
        !            41: 
        !            42:        /**
        !            43:         * Get signature parameters extracted from compressed binary encoding
        !            44:         *
        !            45:         * @param z1            signature vector z1 of size n
        !            46:         * @param z2d           signature vector z2d of size n
        !            47:         * @param c_indices     indices of sparse binary challenge vector of size kappa
        !            48:         */
        !            49:        void (*get_parameters)(bliss_signature_t *this, int32_t **z1, int16_t **z2d,
        !            50:                                                   uint16_t **c_indices);
        !            51: 
        !            52:        /**
        !            53:         * Destroy bliss_signature_t object
        !            54:         */
        !            55:        void (*destroy)(bliss_signature_t *this);
        !            56: 
        !            57: };
        !            58: 
        !            59: /**
        !            60:  * Create a BLISS signature object.
        !            61:  *
        !            62:  * @param set                  BLISS parameter set
        !            63:  */
        !            64: bliss_signature_t *bliss_signature_create(const bliss_param_set_t *set);
        !            65: 
        !            66: /**
        !            67:  * Create a BLISS signature object from encoding.
        !            68:  *
        !            69:  * @param set                  BLISS parameter set
        !            70:  * @param encoding             binary signature encoding
        !            71:  */
        !            72: bliss_signature_t *bliss_signature_create_from_data(const bliss_param_set_t *set,
        !            73:                                                                                                        chunk_t encoding);
        !            74: 
        !            75: #endif /** BLISS_SIGNATURE_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>