Ai
30 Star 131 Fork 0

Gitee 极速下载/OpenSSL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/openssl/openssl
克隆/下载
lms_params.c 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
Bob Beck 提交于 2025-12-09 15:08 +08:00 . 4.0-POST-CLANG-FORMAT-WEBKIT
/*
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include "crypto/lms.h"
/* Refer to SP800-208 Section 4 LMS Parameter Sets */
static const LMS_PARAMS lms_params[] = {
{ OSSL_LMS_TYPE_SHA256_N32_H5, "SHA256", 32, 5 },
{ OSSL_LMS_TYPE_SHA256_N32_H10, "SHA256", 32, 10 },
{ OSSL_LMS_TYPE_SHA256_N32_H15, "SHA256", 32, 15 },
{ OSSL_LMS_TYPE_SHA256_N32_H20, "SHA256", 32, 20 },
{ OSSL_LMS_TYPE_SHA256_N32_H25, "SHA256", 32, 25 },
{ OSSL_LMS_TYPE_SHA256_N24_H5, "SHA256-192", 24, 5 },
{ OSSL_LMS_TYPE_SHA256_N24_H10, "SHA256-192", 24, 10 },
{ OSSL_LMS_TYPE_SHA256_N24_H15, "SHA256-192", 24, 15 },
{ OSSL_LMS_TYPE_SHA256_N24_H20, "SHA256-192", 24, 20 },
{ OSSL_LMS_TYPE_SHA256_N24_H25, "SHA256-192", 24, 25 },
{ OSSL_LMS_TYPE_SHAKE_N32_H5, "SHAKE-256", 32, 5 },
{ OSSL_LMS_TYPE_SHAKE_N32_H10, "SHAKE-256", 32, 10 },
{ OSSL_LMS_TYPE_SHAKE_N32_H15, "SHAKE-256", 32, 15 },
{ OSSL_LMS_TYPE_SHAKE_N32_H20, "SHAKE-256", 32, 20 },
{ OSSL_LMS_TYPE_SHAKE_N32_H25, "SHAKE-256", 32, 25 },
/* SHAKE-256/192 */
{ OSSL_LMS_TYPE_SHAKE_N24_H5, "SHAKE-256", 24, 5 },
{ OSSL_LMS_TYPE_SHAKE_N24_H10, "SHAKE-256", 24, 10 },
{ OSSL_LMS_TYPE_SHAKE_N24_H15, "SHAKE-256", 24, 15 },
{ OSSL_LMS_TYPE_SHAKE_N24_H20, "SHAKE-256", 24, 20 },
{ OSSL_LMS_TYPE_SHAKE_N24_H25, "SHAKE-256", 24, 25 },
{ 0, NULL, 0, 0 }
};
/**
* @brief A getter to convert a |lms_type| into a LMS_PARAMS object.
*
* @param lms_type The type such as OSSL_LMS_TYPE_SHA256_N32_H5.
* @returns The LMS_PARAMS object associated with the |lms_type|, or
* NULL if |lms_type| is undefined.
*/
const LMS_PARAMS *ossl_lms_params_get(uint32_t lms_type)
{
const LMS_PARAMS *p;
for (p = lms_params; p->digestname != NULL; ++p)
if (p->lms_type == lms_type)
return p;
return NULL;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/mirrors/openssl.git
git@gitee.com:mirrors/openssl.git
mirrors
openssl
OpenSSL
master

搜索帮助