简体   繁体   English

使用Hyperledger Fabric Java SDK开发应用程序

[英]Develop application using Hyperledger Fabric Java SDK

I'm modifying an application which uses RSA keys to encrypt and decrypt symmetric keys (which are used to encrypt files). 我正在修改一个使用RSA密钥加密和解密对称密钥(用于加密文件)的应用程序。 I'm trying to substitute this feature of the central server with the Hypelredger Fabric blockchain but I found an issue: the Hypelredger Fabric tool which allows generating keys uses ECDSA algorithm. 我试图用Hypelredger Fabric区块链代替中央服务器的此功能,但发现一个问题:允许生成密钥的Hypelredger Fabric工具使用ECDSA算法。 Do you have suggestions to solve the problem? 您有解决问题的建议吗?

The tools that generates keys (cryptogen) is used to generate keys for signing. 生成密钥的工具(cryptogen)用于生成用于签名的密钥。 Using the same keys for signing and for encryption is considered a bad practice , so you should try to avoid it. 使用相同的密钥进行签名和加密被认为是不好的做法 ,因此应避免使用它。

I suggest you just generate RSA keys with java, and in the chaincode (assuming you use golang chaincode) use the crypto/rsa package. 我建议您仅使用Java生成RSA密钥,并在chaincode(假设您使用golang chaincode)中使用crypto / rsa软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM