1. 首页
  2. 安全技术
  3. 其他
  4. matlab AES直接可用代码

matlab AES直接可用代码

上传者: 2018-12-11 09:56:22上传 RAR文件 4.36KB 热度 41次
csdn找了半天没有直接可以用的代码。这个压缩包解开放一个文件夹 可以直接用 。直接在command 里面输入[s_box, inv_s_box, w, poly_mat, inv_poly_mat] = aes_init; 2 plaintext_hex = {’00’ ’11’ ’22’ ’33’ ’44’ ’55’ ’66’ ’77’ ... 3 ’88’ ’99’ ’aa’ ’bb’ ’cc’ ’dd’ ’ee’ ’ff’}; 4 plaintext = hex2dec (plaintext_hex); 5 ciphertext = cipher (plaintext, w, s_box, poly_mat); 6 re_plaintext = inv_cipher (ciphertext, w, inv_s_box, inv_poly_mat); plaintext 明文 cipehertext密文 re_plaintext解密 key在 aes_init修改 实测可用
用户评论