RSA-Tool是一款RSA算法辅助工具,非常方便大家写rsa算法
2021-11-18 09:49:16 57KB RSA
1
RSA封装类 ,完整的RSA加密和解密 public class RSAUtilEncrypt { public static final String KEY_ALGORTHM = "RSA";// public static final String KEY_ALGORTHM_RSA_ECB_PKCS1PADDING = "RSA/ECB/PKCS1Padding"; public static String RSA_PUBLIC_KEY = "rsa_public_key"; public static String RSA_PRIVATE_KEY = "rsa_private_key"; private int KeySize = 1024; private Map keyMap; private static String RSA = "RSA"; private static PublicKey publickey; public RSAUtilEncrypt(int KeySize,String publickey) { this.KeySize = KeySize; try { this.publickey=generatePublicKeyByString(publickey); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } private RSAPublicKey generatePublicKeyByString(String publicKeyStr) throws Exception { try { BASE64Decoder base64Decoder = new BASE64Decoder(); byte[] buffer = base64Decoder.decodeBuffer(publicKeyStr); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); return (RSAPublicKey) keyFactory.generatePublic(keySpec); } catch (NoSuchAlgorithmException e) { throw new Exception("No Algorthm,Checked by cemung!"); } catch (InvalidKeySpecException e) { throw new Exception("InvalidKeySpec!"); } catch (IOException e) { throw new Exception("Io exception!"); } catch (NullPointerException e) { throw new Exception("Illegle pointer reference!"); } } // Encypt public byte[] RSAEncrypt(byte[] data, RSAPublicKey publickey) throws Exception { Cipher cipher = Cipher.getInstance(KEY_ALGORTHM_RSA_ECB_PKCS1PADDING); cipher.init(Cipher.ENCRYPT_MODE, this.publickey); byte[] cipherbytes = cipher.doFinal(data); return cipherbytes; } // Encypt public byte[] RSAEncrypt(byte[] data) throws Exception { Cipher cipher = Cipher.getInstance(KEY_ALGORTHM_RSA_ECB_PKCS1PADDING); cipher.init(Cipher.ENCRYPT_MODE, this.publickey); byte[] cipherbytes = cipher.doFinal(data); return cipherbytes;
2021-11-18 09:46:15 5KB RSA加密
1
P2PGo gop2p是一个Golang库,用于启用软件客户端之间基于UDP的简单死信对等通信。 目的是能够通过发出由RSA签名的命令来远程控制各种节点。 对等方维护仅客户机具有的公共密钥到私有密钥。 这是我的第一个大型项目,因此可能并不漂亮,但运行速度确实非常快。 安装 客户端文件夹包含运行发出命令的客户端所需的所有代码。 对等文件夹包含运行节点所需的所有代码。 生成公用和专用RSA密钥后,将它们放入客户端和对等方的cryptotext.go文件中。 用法 将密钥放置在正确的位置后,使用以下命令运行客户端: ./client 像这
2021-11-18 09:42:42 41KB go golang udp p2p
1
C实现的RSA2048签名,包含解决方案程序,懂C的同学可以看看
2021-11-18 09:42:42 8KB RSA 2048
1
此工具支持3DES对称加解密,AES对称加解密,base64编解码,RSA密钥对的生成,MD5和SHA1信息摘要,RSA数字签名以及验证签名, RSA非对称加解密
2021-11-18 09:38:58 1.58MB RSA tool
1
RSA加密解密C#实现调用实例 public string RSAEncrypt(string xmlPublicKey, string m_strEncryptString) { try { byte[] PlainTextBArray; byte[] CypherTextBArray; string Result; System.Security.Cryptography.RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); rsa.FromXmlString(xmlPublicKey); PlainTextBArray = (new UnicodeEncoding()).GetBytes(m_strEncryptString); CypherTextBArray = rsa.Encrypt(PlainTextBArray, false); Result = Convert.ToBase64String(CypherTextBArray); return Result; } catch (Exception ex) { throw ex; } } //RSA的加密函数 public string RSAEncrypt(string xmlPublicKey, byte[] EncryptString) { try { byte[] CypherTextBArray; string Result; System.Security.Cryptography.RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); rsa.FromXmlString(xmlPublicKey); CypherTextBArray = rsa.Encrypt(EncryptString, false); Result = Convert.ToBase64String(CypherTextBArray); return Result; } catch (Exception ex) { throw ex; } }
2021-11-18 09:37:36 2KB RSA
1
实现RAS加解密,生成公私钥
2021-11-18 09:36:07 27KB RSA加密
1
最近在研究RSA,所以找了很多例子,现在发布出来给大家分享一下
2021-11-18 09:34:08 2.58MB java RSA
1
此代码是RSA加密算法的python代码的简单实现,包括对任意明文的加密解密
2021-11-18 09:32:18 519B RSA
1
CTF中密码学爆破RSA脚本,CTF中密码学爆破RSA脚本CTF中密码学爆破RSA脚本CTF中密码学爆破RSA脚本。
2021-11-18 09:30:45 998B RSA CTF
1