문제

Hello everybody and sorry for my hard english. I know how work rsa and all is simply for understand, but i dont understand how implement block division. some example supposably we have alphabet where a-10,b-11...z-35. we presented our message "abcdefg" like "10111213141516", split this into blocks(for example in trhees "101""112"...for n=352),crypt this blocks and get crypted text. but what if after crypt (c = (m^e)mod n)we get some blocks with two numbers? and when we try decrypted text and split into blocks, we get other blocks maybe... in fine, sorry for my muddled thoughts and bad language and tell me what is true way in java for splitting text, what the length for blocks need...

도움이 되었습니까?

해결책

Why implement if there is allready JCA APIs?
http://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html
It covers Java Security standards, has plenty of implemented algorithms.

See also some examples:
http://www.flexiprovider.de/examples/ExampleRSA.html
Single Asymmetric Key
RSA java example Encryption / Decryption

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top