支持国密算法的JavaScript通用密码库的实现  被引量:6

Implementation of a General-purpose Cryptography Library Supporting Domestic Algorithm with JavaScript

在线阅读下载全文

作  者:魏荣 郑昉昱[1,2] 林璟锵 WEI Rong;ZHENG Fang-Yu;LIN Jing-Qiang(State Key Laboratory of Information Security,Institute of Information Engineering,Chinese Academy of Sciences,Beijing 100093,China;Data Assurance and Communications Security Research Center,Chinese Academy of Sciences,Beijing 100093,China;School of Cyber Security,University of Chinese Academy of Sciences,Beijing 100049,China;School of Cyber Security,University of Science and Technology of China,Hefei 230026,China)

机构地区:[1]中国科学院信息工程研究所信息安全国家重点实验室,北京100093 [2]中国科学院数据与通信保护研究教育中心,北京100093 [3]中国科学院大学网络空间安全学院,北京100049 [4]中国科学技术大学网络空间安全学院,合肥230026

出  处:《密码学报》2020年第5期595-604,共10页Journal of Cryptologic Research

基  金:国家重点研发计划(2017YFB0802100);国家自然科学基金(61772518)。

摘  要:随着近年来Web应用的大量普及及其安全问题的频发,用JavaScript进行一些密码运算的需求也随之而来.相比传统外插硬件外加驱动的密码计算模式,用JavaScript实现密码算法具有跨平台、免安装、兼容性好的优点.我们基于一款用JavaScript编写的国际密码算法库,加入了国密SM2、SM3和SM4算法,并使用固定基的comb方法对椭圆曲线固定点的标量乘进行了优化,使密钥生成和签名速度提升了一倍以上.在保证运算速度的同时,我们也尽量保持了代码量的最小化,以减小流量消耗和下载时长.我们在Chrome、Firefox、Opera和Maxthon浏览器中进行了验证和性能评估,在Firefox上,SM2签名算法性能达到了每秒生成100对密钥,签名95次,验签40次,SM3算法速度达到了69.75 Mbps,SM4算法速度达到了110.97 Mbps.With the popularity of Web applications and their frequent occurrence of security problems in recent years,JavaScript becomes very useful for some cryptographic computations.Compared with the traditional pluggable-hardware&driver mode for cryptographic computation,implementation of cryptographic algorithms with JavaScript has many advantages,such as cross-platform compatibility and installation-free.We implemented the national standard encryption algorithms SM2,SM3 and SM4 based on a JavaScript-programed cryptography library for international encryption algorithms.In addition,we took advantage of the fixed-base comb method to optimize the fixed-point scalarmultiplication of elliptic curve cryptographic algorithm,thus achieved more than double-speed of key generation and signature generation than before.Without losing the library’s runtime performance,we tried to minimize the code size,so as to reduce the network traffic consumption and the transmission latency.Experiments were carried out in Chrome,Firefox,Opera and Maxthon browsers.In Firefox,SM2 signature algorithm generated 100 pairs of keys,and finished 95 operations of signature generation and 40 operations of signature verification per second.The speed of SM3 and SM4 algorithm can reach69.75 Mbps and 110.97 Mbps,respectively.

关 键 词:WEB应用 JAVASCRIPT 国密算法 标量乘 密码库 

分 类 号:TP309.7[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象