Annotation of embedaddon/strongswan/src/libstrongswan/plugins/drbg/drbg_ctr.h, revision 1.1

1.1     ! misho       1: /*
        !             2:  * Copyright (C) 2019 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 drbg_ctr drbg_ctr
        !            18:  * @{ @ingroup drbg_p
        !            19:  */
        !            20: 
        !            21: #ifndef DRBG_CTR_H_
        !            22: #define DRBG_CTR_H_
        !            23: 
        !            24: #include <crypto/drbgs/drbg.h>
        !            25: 
        !            26: typedef struct drbg_ctr_t drbg_ctr_t;
        !            27: 
        !            28: /**
        !            29:  * NIST SP 800-90A CTR DRBC implementation
        !            30:  */
        !            31: struct drbg_ctr_t {
        !            32: 
        !            33:        /**
        !            34:         * Public Deterministic Random Bit Generator (DRBG) Interface
        !            35:         */
        !            36:        drbg_t interface;
        !            37: };
        !            38: 
        !            39: /**
        !            40:  * Create a drbg_ctr instance.
        !            41:  *
        !            42:  * @param type                                 DRBG CTR type
        !            43:  * @param strength                             security strength in bits
        !            44:  * @param entropy                              entropy source to be used
        !            45:  * @param personalization_str  optional personalization string
        !            46:  * @return                                             drbg_ctr_t object, NULL if not supported
        !            47:  */
        !            48: drbg_ctr_t *drbg_ctr_create(drbg_type_t type, uint32_t strength,
        !            49:                                                        rng_t *entropy, chunk_t personalization_str);
        !            50: 
        !            51: #endif /** DRBG_CTR_H_ @}*/

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