RSA加密输出大小 [英] RSA Encryption output size
本文介绍了RSA加密输出大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用2048位键(使用pkcs1padding)时,RSA加密输出大小是多少?它总是256字节独立于输入大小吗?
如何计算其他关键大小?
What is RSA encryption output size when using 2048 bit key (using pkcs1padding). Is it always 256 bytes independent of input size? how can i calculate it for other key sizes?
推荐答案
是
输出大小 应该总是等于 Modulus的大小
(部分键),所以:
The output-size should always equals the size of the Modulus
(part of the key), so:
2048 bit Modulus -> 2048 bit output
1024 bit Modulus -> 1024 bit output
...
如果不是, em> RSA ,请参阅此处了解有关基本信息。
If it is not, there exist numerous attacks on RSA, see here for basic information about that.
所以为了保证输出是 2048位
即使输入加密是,我们假设 7
,
必须始终应用填充!
So to guarantee that the output is 2048 bit
even when the input to encrypt is, let's say 7
,
a padding must always be applied!
这篇关于RSA加密输出大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文