简体   繁体   English

RSA加密数据块大小

[英]RSA encrypted data block size

how do you store an rsa encrypted data block? 您如何存储rsa加密数据块? the output might be significantly greater than the original input data block size, and i dont think people waste memory by padding bucket loads of 0s in front of each data block. 输出可能大大大于原始输入数据块的大小,并且我不认为人们会通过在每个数据块的前面填充0的存储桶负载来浪费内存。 besides, how would they be removed? 此外,如何将其删除? or is each block stored on new lines within the file? 还是每个块都存储在文件中的新行上? if that is the case, how would you tell the difference between legitimate new line and a '\\n' char written into the file? 如果是这样,您如何区分合法的新行和写入文件的'\\ n'字符之间的区别?

what am i missing? 我想念什么? im writing the "write to file" part in python, so maybe its one of the differences between: 我在python中编写了“写入文件”部分,因此也许是它们之间的区别之一:

open(file,'w')
open(file,'w+b')
open(file,'wb')

that i dont know. 我不知道。 or is it something else? 或者是别的什么?

You are missing that they do indeed pad with bucket loads of random bits . 您会丢失它们确实确实填充了随机位的存储桶负载的信息

Some padding schemes use the first few bytes to describe how many bytes are padding; 一些填充方案使用前几个字节来描述要填充的字节数。 others have "everything until the first 0x00" is padding. 其他人则拥有“直到第一个0x00为止的所有内容”。

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

相关问题 使用 bouncycastle 在 C# 中使用 cryptodome 解密在 python 中加密的 RSA 数据会导致错误块不正确 - Decrypting RSA data encrypted in python with cryptodome in C# using bouncycastle gives error block incorrect 如何使用pycrypto将RSA加密数据存储到postgresql? - How to store RSA encrypted data to postgresql by using pycrypto? 如何解密用 RSA 加密的块? - How to decrypt blocks encrypted with RSA? 如何在python中使用加密的RSA私钥(AES-256-CBC)对数据进行签名 - How to sign data with encrypted RSA private key (AES-256-CBC) in python 导出使用python-rsa加密的消息 - Export message that encrypted with python-rsa 使用python和RSA算法的加密聊天应用程序 - Encrypted chat app using python and RSA algorithm 如何在PyCrypto中使用加密的RSA私钥? - How to use encrypted RSA private key with PyCrypto? 无法解码加密的 rsa 消息 python3 - Cannot decode encrypted rsa message python3 使用 AES 256 加密的 pyOpenSSL RSA 私钥 - pyOpenSSL RSA private keys encrypted with AES 256 ValueError:数据必须与 ECB 模式下的块边界对齐(或加密文本编码的附加反斜杠) - ValueError: Data must be aligned to block boundary in ECB mode (or additional backslashes from encoding of encrypted text)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM