开发者

from Plain text generate encrypted text of same legnth [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

开发者_运维百科

Closed 7 years ago.

Improve this question

I want to create a java program in which I will give plain text , a key then the output should be of same length as of plain text. Using the same key I will decrypt the encrypted text. So please suggest me how to proceed?

Thanks.


What sort of encryption scheme are you wanting? The Vigenère cipher will give you ciphertext of the same length as your plaintext, but if the key is not random the ciphertext will be vulnerable to various frequency attacks such as the Kasiski examination.

What are you trying to achieve?


Using a stream cipher like RC4 or a block cipher like AES in a counter mode can do what you want. However, these still require an a random IV for each message so you have to somehow manage that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜