简体   繁体   中英

RSA encrypted data block size

how do you store an rsa encrypted data block? 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. 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?

what am i missing? im writing the "write to file" part in python, so maybe its one of the differences between:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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