函数逻辑报告 |
Source Code:lib\crypto\chacha20poly1305-selftest.c |
Create Date:2022-07-27 07:42:58 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:chacha20poly1305_selftest
函数原型:bool __init chacha20poly1305_selftest(void)
返回类型:bool
参数:无
7250 | enum{MAXIMUM_TEST_BUFFER_LEN = 1UL << 12} |
7252 | u8 * computed_output = NULL, * heap_src = NULL |
7258 | 如果非heap_src或非computed_output则 |
7265 | memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN) |
7266 | chacha20poly1305_selftest_encrypt(computed_output, input, ilen, assoc, alen, nonce, nlen, key) |
7274 | 如果memcmp(computed_output, output, ilen + POLY1305_DIGEST_SIZE)则 |
7285 | 如果nlen不等于8则继续下一循环 |
7289 | 初始化散列表项目 |
7291 | chacha20poly1305_encrypt_sg_inplace( & sg_src, ilen, assoc, alen, get_unaligned_le64(nonce), key) |
7297 | 如果memcmp(heap_src, output, ilen + POLY1305_DIGEST_SIZE)则 |
7308 | memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN) |
7309 | ret等于chacha20poly1305_decrypt(computed_output, input, ilen, assoc, alen, get_unaligned_le64(nonce), key) |
7316 | 如果非decryption_success(ret, failure, memcmp(computed_output, output, ilen - POLY1305_DIGEST_SIZE))则 |
7331 | 初始化散列表项目 |
7333 | ret等于chacha20poly1305_decrypt_sg_inplace( & sg_src, ilen, assoc, alen, get_unaligned_le64(nonce), key) |
7339 | 如果非decryption_success(ret, failure, memcmp(heap_src, output, ilen - POLY1305_DIGEST_SIZE))则 |
7351 | memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN) |
7352 | xchacha20poly1305_encrypt(computed_output, input, ilen, assoc, alen, nonce, key) |
7359 | 如果memcmp(computed_output, output, ilen + POLY1305_DIGEST_SIZE)则 |
7369 | memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN) |
7370 | ret等于xchacha20poly1305_decrypt(computed_output, input, ilen, assoc, alen, nonce, key) |
7377 | 如果非decryption_success(ret, failure, memcmp(computed_output, output, ilen - POLY1305_DIGEST_SIZE))则 |
7389 | out : |
7391 | kfree(computed_output) |
7392 | 返回:success |
名称 | 描述 |
---|---|
mod_init |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |