###############################################################################
# AES-GCM-SIV developers and authors: #
# #
# Shay Gueron, University of Haifa, Israel and #
# Intel Corporation, Israel Development Center, Haifa, Israel #
# Adam Langley, Google. #
# Yehuda Lindell, Bar Ilan University #
###############################################################################
# #
# References: #
# #
# [1] S. Gueron, Y. Lindell, GCM-SIV: Full Nonce Misuse-Resistant #
# Authenticated Encryption at Under One Cycle per Byte, #
# 22nd ACM Conference on Computer and Communications Security, #
# 22nd ACM CCS: pages 109-119, 2015. #
# [2] S. Gueron, A. Langley, Y. Lindell, AES-GCM-SIV: Nonce Misuse-Resistant #
# Authenticated Encryption. #
# https://tools.ietf.org/html/draft-gueron-gcmsiv-02# #
###############################################################################
# #
###############################################################################
# #
# Copyright (c) 2016, Shay Gueron #
# #
# All rights reserved. #
# #
# Permission to use this code is granted only for the purpose of evaluating #
# AES-GCM-SIV. #
# #
# Redistribution and use in source and binary forms, with or without #
# modification, are permitted provided that the following conditions are #
# met: #
# #
# * Redistributions of source code must retain the above copyright notice, #
# this list of conditions and the following disclaimer. #
# #
# * Redistributions in binary form must reproduce the above copyright #
# notice, this list of conditions and the following disclaimer in the #
# documentation and/or other materials provided with the distribution. #
# #
# * The names of the contributors may not be used to endorse or promote #
# products derived from this software without specific prior written #
# permission. #
# #
###############################################################################
# #
###############################################################################
# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ""AS IS"" AND ANY #
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE #
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR #
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR #
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, #
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR #
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF #
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING #
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS #
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #
###############################################################################
GENERAL_PURPOSE_SIV
To compile, use the makefile in 2 ways:
1. make DEF=-DDETAILS - The executable will print outputs for
according to provided parameters
2. make - The executable will run 40 random tests
The compilation line is:
gcc -DDETAILS main.c SIV_GCM_c.c clmul_emulator.c aes_emulation.c aes_emulation_tables.c -o GCM_SIV_GENERAL
The parameters are: GCM_SIV_GENERAL A B
A - AAD length in bytes
B - MSG length in bytes
in SIV_GCM_c.c are implemented:
1. POLYVAL,
2. GCM_SIV_ENC_1_Key
3. GCM_SIV_DEC_1_Keys
4. GCM_SIV_ENC_2_Keys
5. GCM_SIV_DEC_2_Keys
This implementation of AES-GCM-SIV supports message length of up to 2^31 - 1 bytes, and AAD length of up to 2^31 - 1 bytes.
It is possible to modify this implementation to support larger input (message and AAD) sizes up to the maximum allowed sizes (e.g., message of 2^36 – 1 byes) that are allowed by the specification document.
Such changes need to be done carefully, because supporting very long input could degrade the performance due to the limited cache and memory sizes supported by the OS.
The output example:
*****************************
Performing SIV_GCM - Two Keys:
*****************************
AAD_len = 12 bytes
MSG_len = 34 bytes
BYTES ORDER
LSB--------------------------MSB
00010203040506070809101112131415
--------------------------------
K1 = H = 03000000000000000000000000000000
K2 = K = 01000000000000000000000000000000
NONCE = 03000000000000000000000000000000
AAD = 010000000000000000000000
MSG = 02000000000000000000000000000000
03000000000000000000000000000000
0400
PADDED_AAD = 01000000000000000000000000000000
PADDED_MSG = 02000000000000000000000000000000
03000000000000000000000000000000
04000000000000000000000000000000
LENBLK = 10010000000000006000000000000000
POLYVAL = 6d02000000000040d900c04c63ad9807
POLYVAL_xor_NONCE = 6e02000000000040d900c04c63ad9807
with_MSbit_cleared = 6e02000000000040d900c04c63ad9807
TAG = 7b01c2703733cd550145d99f1e36a3b0
CTRBLK = 010000003733cd550145d99f1e36a3b0
TAG' = 7b01c2703733cd550145d99f1e36a3b0
AAD = 010000000000000000000000
CIPHERTEXT = b1d7eecccbc79d7327faf971603a7cf3
53569936ac2a97a7e9ef93997acb0ab8
06ae
Decrypted MSG = 02000000000000000000000000000000
03000000000000000000000000000000
0400
SIV_GCM_2_KEYS Passed
没有合适的资源?快使用搜索试试~ 我知道了~
AES_GCM_SIV_256_GCM源码_GCM_AES_
共84个文件
c:16个
txt:16个
gcm_siv_dec:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 4 下载量 115 浏览量
2021-09-30
06:19:11
上传
评论
收藏 583KB ZIP 举报
温馨提示
aes gcm siv 256 算法加密解密源程序,GitHub源码
资源推荐
资源详情
资源评论
收起资源包目录
AES_GCM_SIV_256.zip (84个子文件)
AES_GCM_SIV_256
README_256.txt 2KB
AES_GCM_SIV_256_Performance_Code
polyval_htble.s 17KB
general_functions.c 14KB
executables_measure
GCM_SIV_ENC 44KB
GCM_SIV_DEC 44KB
GCM_SIV.c 11KB
dec_msg_htable_x6.s 17KB
enc_msg_x4.s 10KB
measurements.h 7KB
executables_with_printouts
GCM_SIV_ENC 45KB
GCM_SIV_DEC 46KB
executables_with_printouts_ADD_INFO_BE
output_add_info_be.txt 87KB
GCM_SIV_ENC 45KB
scrpt_2keys 842B
GCM_SIV_DEC 46KB
key_expands_and_enc.s 22KB
executables_with_printouts_BE
GCM_SIV_ENC 45KB
scrpt_2keys 842B
GCM_SIV_DEC 45KB
output_be.txt 83KB
README.txt 6KB
Makefile 587B
GCM_SIV.h 9KB
make_all 1KB
output.txt 87KB
executables_with_printouts_LE
GCM_SIV_ENC 45KB
scrpt_2keys 842B
GCM_SIV_DEC 45KB
output_le.txt 85KB
enc_msg_x8.s 12KB
polyval_horner.s 10KB
executables_with_printouts_ADD_INFO_LE
output_add_info_le.txt 89KB
GCM_SIV_ENC 45KB
scrpt_2keys 842B
GCM_SIV_DEC 45KB
main.c 12KB
AES_GCM_SIV_256_Reference_Code
out_BE.txt 28KB
out_LE.txt 29KB
GCM_SIV_GENERAL_V02_LE 31KB
scrpt_2keys 3KB
aes_emulation.h 5KB
GCM_SIV_c.c 15KB
README.txt 8KB
Makefile 406B
GCM_SIV_GENERAL_V02_BE 31KB
clmul_emulator.h 5KB
clmul_emulator.c 7KB
aes_emulation_tables.c 31KB
aes_emulation.c 7KB
main.c 11KB
AES_GCM_SIV_256_C_Intrinsics_Code
enc_msg_x4.c 8KB
general_functions.c 14KB
executables_measure
GCM_SIV_ENC 34KB
GCM_SIV_DEC 34KB
key_expands_and_enc.c 17KB
GCM_SIV.c 11KB
measurements.h 7KB
executables_with_printouts
GCM_SIV_ENC 34KB
GCM_SIV_DEC 35KB
executables_with_printouts_ADD_INFO_BE
output_add_info_be.txt 87KB
GCM_SIV_ENC 34KB
scrpt_2keys 842B
GCM_SIV_DEC 35KB
executables_with_printouts_BE
GCM_SIV_ENC 34KB
scrpt_2keys 842B
GCM_SIV_DEC 34KB
output_be.txt 83KB
dec_msg_htable_x6.c 21KB
README.txt 6KB
Makefile 575B
GCM_SIV.h 9KB
make_all 1KB
output.txt 87KB
enc_msg_x8.c 9KB
executables_with_printouts_LE
GCM_SIV_ENC 34KB
scrpt_2keys 842B
GCM_SIV_DEC 34KB
output_le.txt 85KB
polyval.c 15KB
executables_with_printouts_ADD_INFO_LE
output_add_info_le.txt 89KB
GCM_SIV_ENC 34KB
scrpt_2keys 842B
GCM_SIV_DEC 34KB
main.c 12KB
共 84 条
- 1
资源评论
- dcq0182022-07-08资源不错,内容挺好的,有一定的使用价值,值得借鉴,感谢分享。
- weixin_410301272023-04-03资源内容详实,描述详尽,解决了我的问题,受益匪浅,学到了。
- lqh_batistuta2022-06-15用户下载后在一定时间内未进行评价,系统默认好评。
呼啸庄主
- 粉丝: 74
- 资源: 4702
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功