简体   繁体   中英

C# Encryption Format

Is there any way to find the encryption format of a string? I mean to say that I have a encrypted string and I want to find out which method was used to encrypt the string, because different encryption methods encrypt strings in different format.

I assume that you are not talking about something like Base64, but about encryption using 3DES, AES, RC4 or whatever.

The answer is no, you cannot tell. Any good encryption produces output that appears random. You can tell a little from the size of the output. If it is a multiple of 16 bits then it may well be a 128 bit cypher, like AES. If it is a multiple of 8 bits, but not of 16, then it is probably a 64 bit cypher like DES or 3DES. If it is not a multiple of either then it is probably a stream cypher: RC4 or Salsa20, or a block cypher in one of the stream-like modes: CTR or GCM.

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