snooper taoism 2 中 sm2 辅助计算脚本
2011-08-10 11:45
309 查看
static static_prompt = "sm2(临时版)" position = 0% width = 100% height = 1
crlf
static static_sm2_private_key = "private key" position = 0% width = 100% height = 1
crlf
edit sm2_private_key filename = "sm2_private_key" position = 0% width = 60% height = 2
crlf
static static_sm2_public_key = "public key" position = 0% width = 100% height = 1
crlf
edit sm2_public_key filename = "sm2_public_key" position = 0% width = 60% height = 2
button sm2_generate_keypair = "sm2_generate_keypair" position = 61% width = 40% height = 1
crlf
static static_0001 = "---------------------------------" position = 0% width = 100% height = 1
crlf
static static_sm2_hash = "hash result ( must non zero )" position = 0% width = 100% height = 1
crlf
edit sm2_hash filename = "sm2_hash" position = 0% width = 100% height = 2
crlf
static static_sm2_sign_r = "R" position = 0% width = 49% height = 1
static static_sm2_sign_s = "S" position = 50% width = 49% height = 1
crlf
edit sm2_sign_r filename = "sm2_sign_r" position = 0% width = 49% height = 2
edit sm2_sign_s filename = "sm2_sign_s" position = 50% width = 49% height = 2
crlf
static static_sm2_sign_result = "verify result (00 success, other failure)" position = 0% width = 100% height = 1
crlf
edit sm2_sign_verify_result filename = "sm2_sign_verify_result" position = 0% width = 100% height = 1
crlf
button sm2_sign = "sm2_sign" position = 0% width = 40% height = 1
button sm2_sign_verify = "sm2_sign_verify" positiont= 50^ width = 40% height = 1
crlf
static static_0002 = "---------------------------------" position = 0% width = 100% height = 1
crlf
static static_sm2_input = "input" position = 0% width = 100% height = 1
crlf
edit sm2_input filename = "sm2_input" position = 0% width = 100% height = 2
crlf
static static_sm2_output = "output" position = 0% width = 100% height = 1
button swap_input_output = "swap input output" position = 51% width = 49% height = 1
crlf
edit sm2_output filename = "sm2_output" position = 0% width = 100% height = 2
crlf
button sm2_pub_encode = "sm2_pub_encode" position = 0% width = 40% height = 1
button sm2_pri_decode = "sm2_pri_decode" positiont= 50^ width = 40% height = 1
crlf
static static_0003 = "------------ use sm2 key run ecc dh -----------" position = 0% width = 100% height = 1
crlf
static static_sm2_dh_prikey1 = "sm2 private key1" position = 0% width = 49% height = 1
static static_sm2_dh_pubkey2 = "sm2 public key2" position = 50% width = 49% height = 1
crlf
edit sm2_dh_prikey1 filename = "sm2_dh_prikey1" position = 0% width = 49% height = 2
edit sm2_dh_pubkey2 filename = "sm2_dh_pubkey2" position = 50% width = 49% height = 2
crlf
static static_sm2_dh_result = "ecc dh result" position = 0% width = 49% height = 1
crlf
edit sm2_dh_result filename = "ecc_ch_result" position = 0% width = 100% height = 2
crlf
button sm2_ecc_dh = "sm2_ecc_dh" position = 30% width = 40% height = 1
crlf
function sm2_ecc_dh
sm2_dh_result = sm2_ecc_dh( $sm2_dh_prikey1, $sm2_dh_pubkey2 )
end function
function sm2_generate_keypair
null = clear_fifo()
null = sm2_generate_keypair()
sm2_public_key = read_fifo()
sm2_private_key = read_fifo()
end function
function sm2_sign
null = clear_fifo()
null = sm2_sign( $sm2_private_key, $sm2_hash )
sm2_sign_r = read_fifo()
sm2_sign_s = read_fifo()
end function
function sm2_sign_verify
sm2_sign_verify_result = sm2_sign_verify( $sm2_public_key, $sm2_hash, $sm2_sign_r, $sm2_sign_s )
end function
function sm2_pub_encode
sm2_output = sm2_pub_encode( $sm2_input, $sm2_public_key )
end function
function sm2_pri_decode
sm2_output = sm2_pri_decode( $sm2_input, $sm2_private_key )
end function
function swap_input_output
null = clear_fifo()
null = write_fifo( $sm2_input )
null = write_fifo( $sm2_output )
sm2_output = read_fifo()
sm2_input = read_fifo()
end function
crlf
static static_sm2_private_key = "private key" position = 0% width = 100% height = 1
crlf
edit sm2_private_key filename = "sm2_private_key" position = 0% width = 60% height = 2
crlf
static static_sm2_public_key = "public key" position = 0% width = 100% height = 1
crlf
edit sm2_public_key filename = "sm2_public_key" position = 0% width = 60% height = 2
button sm2_generate_keypair = "sm2_generate_keypair" position = 61% width = 40% height = 1
crlf
static static_0001 = "---------------------------------" position = 0% width = 100% height = 1
crlf
static static_sm2_hash = "hash result ( must non zero )" position = 0% width = 100% height = 1
crlf
edit sm2_hash filename = "sm2_hash" position = 0% width = 100% height = 2
crlf
static static_sm2_sign_r = "R" position = 0% width = 49% height = 1
static static_sm2_sign_s = "S" position = 50% width = 49% height = 1
crlf
edit sm2_sign_r filename = "sm2_sign_r" position = 0% width = 49% height = 2
edit sm2_sign_s filename = "sm2_sign_s" position = 50% width = 49% height = 2
crlf
static static_sm2_sign_result = "verify result (00 success, other failure)" position = 0% width = 100% height = 1
crlf
edit sm2_sign_verify_result filename = "sm2_sign_verify_result" position = 0% width = 100% height = 1
crlf
button sm2_sign = "sm2_sign" position = 0% width = 40% height = 1
button sm2_sign_verify = "sm2_sign_verify" positiont= 50^ width = 40% height = 1
crlf
static static_0002 = "---------------------------------" position = 0% width = 100% height = 1
crlf
static static_sm2_input = "input" position = 0% width = 100% height = 1
crlf
edit sm2_input filename = "sm2_input" position = 0% width = 100% height = 2
crlf
static static_sm2_output = "output" position = 0% width = 100% height = 1
button swap_input_output = "swap input output" position = 51% width = 49% height = 1
crlf
edit sm2_output filename = "sm2_output" position = 0% width = 100% height = 2
crlf
button sm2_pub_encode = "sm2_pub_encode" position = 0% width = 40% height = 1
button sm2_pri_decode = "sm2_pri_decode" positiont= 50^ width = 40% height = 1
crlf
static static_0003 = "------------ use sm2 key run ecc dh -----------" position = 0% width = 100% height = 1
crlf
static static_sm2_dh_prikey1 = "sm2 private key1" position = 0% width = 49% height = 1
static static_sm2_dh_pubkey2 = "sm2 public key2" position = 50% width = 49% height = 1
crlf
edit sm2_dh_prikey1 filename = "sm2_dh_prikey1" position = 0% width = 49% height = 2
edit sm2_dh_pubkey2 filename = "sm2_dh_pubkey2" position = 50% width = 49% height = 2
crlf
static static_sm2_dh_result = "ecc dh result" position = 0% width = 49% height = 1
crlf
edit sm2_dh_result filename = "ecc_ch_result" position = 0% width = 100% height = 2
crlf
button sm2_ecc_dh = "sm2_ecc_dh" position = 30% width = 40% height = 1
crlf
function sm2_ecc_dh
sm2_dh_result = sm2_ecc_dh( $sm2_dh_prikey1, $sm2_dh_pubkey2 )
end function
function sm2_generate_keypair
null = clear_fifo()
null = sm2_generate_keypair()
sm2_public_key = read_fifo()
sm2_private_key = read_fifo()
end function
function sm2_sign
null = clear_fifo()
null = sm2_sign( $sm2_private_key, $sm2_hash )
sm2_sign_r = read_fifo()
sm2_sign_s = read_fifo()
end function
function sm2_sign_verify
sm2_sign_verify_result = sm2_sign_verify( $sm2_public_key, $sm2_hash, $sm2_sign_r, $sm2_sign_s )
end function
function sm2_pub_encode
sm2_output = sm2_pub_encode( $sm2_input, $sm2_public_key )
end function
function sm2_pri_decode
sm2_output = sm2_pri_decode( $sm2_input, $sm2_private_key )
end function
function swap_input_output
null = clear_fifo()
null = write_fifo( $sm2_input )
null = write_fifo( $sm2_output )
sm2_output = read_fifo()
sm2_input = read_fifo()
end function
相关文章推荐
- Snooper taoism辅助计算工具中base64界面脚本
- 辅助计算工具中hash部分界面脚本
- taoism 2中sm3辅助计算工具脚本
- Snooper taoism版中已经实现的可由用户自定义的辅助计算功能示例
- 自己写的一个sqlserver弱口令扫描工具辅助脚本(提升扫描速度效率,速度极快)
- 用shell scripts 脚本完成 计算"您还有几天就过生日"
- 翻出来的老物件,11年学习易语言之后写的一个游戏策划脚本辅助工具
- 【脚本】检测CPU计算能力
- 中文姓名笔画计算(VBS脚本版)
- iOS 工程自动化 - Ruby 入门到辅助脚本编写
- PHP日期与时间的应用 计算脚本运行时间
- Unity3D计算角色与物体之间的距离来触发动画【脚本】
- PHP计算脚本运行微秒数
- linux下计算内存使用率的脚本
- 用shell脚本写的可以计算出自己来到这个世界的天数
- 在arcgis使用python脚本进行字段计算时是如何解决中文问题的
- 一个计算的小脚本
- MySQL实时统计脚本--计算QPS,TPS和线程连接数等
- Python小脚本:计算两个文件内容的相似率
- 用shell脚本计算日期的小函数们