An estimate of the cryptographic algorithm used - encryption

I'm trying to decrypt a password hanging on a specific data packet.
The plaintext that creates the encrypted data packet is also composed of an unknown combination, so the encryption is doubled.
Brute Force Attack cannot be applied to the entire plaintext, but only to a part of it, making it difficult to estimate the password structure.
Hello, I am currently trying to decrypt by estimating the encryption algorithm applied to a specific data packet.
For this encrypted data packet, two different encryption algorithms were applied.
The pictorial representation is as follows:
Data packet is 16bit, and only plaintext_2 is available for plaintext capable of Brute Force Attack.
At this time, the rest of the plaintext is in a state where there is no change in value.
plaintext_2 is 8 bits and has a value in the range of 0x00 to 0xFF. It shows the characteristics of data packet circulation according to the change of this value.
(In plaintext_2, data packets are grouped into 4 sections: 0x00~0x3F, 0x40~0x7F, 0x80~0xBF, 0xC0~0xFF. And in the 0x00~0x3F section, a total of 4 data packets with the same value appear.
For example, when plaintext_2 has values of 0x00, 0x12, 0x24, and 0x36, data packets are the same value.)
I'm trying to find out which algorithm 'Encryption_1' is among the two applied encryption algorithms, but I can't figure it out.
The algorithm I'm guessing is CRC16, but I'm not sure.
Attach Plaintext_2 and DataPacket.

Related

File Delimiters on AES 256 Encrypted fields

I have a requirement for one of my projects in which I am expecting a few of the incoming fields encrypted as AES-256 when sent to us by upstream. The incoming file is comma delimited. Is there a possibility that the AES encrypted fields may contain "," throwing off the values to different fields? What about if it is pipe delimited or some other delimiter?
Also, how what should be the datatype of these encrypted fields in order to read these encrypted fields using an ETL tool?
Thanks in Advance
AES as a block cipher is a family of permutations selected by the key. The output is expected to be random ( more precisely we believe that AES is a Pseudo-Random-Permutation)
AES ( like any block cipher) outputs binary data, usually as a byte array and bytes can take any value between 0 and 256 with equal probability.
You are not alone;
Transmitting binary data can create problems, especially in protocols that are designed to deal with textual data. To avoid it altogether, we don't transmit binary data. Many of the programming errors related to encryption on Stack Overflow are due to sending binary data over text-based protocols. Most of the time this works, but occasionally it fails and the coders wonder about the problem. The binary data corrupts the network protocol.
Therefore hex, base64, or similar encodings are necessary to mitigate this. Base64 is not totally URL safe and one can make it URL safe with a little work.
And note that has nothing to do with security; it is about visibility and interoperability.

AES encryption for repetitive small data packets

I'm trying to implement simple AES encryption for small data packets (8bytes, fixed length) being sent from nodes with very little computational resources.
Ideally the encrypted data would be a single 16byte packet. The data being sent is very repetitive (for an example, wind velocity packet "S011D023", where S and D would always be in the same place, length would always be 8). The nodes may not have the ability to hold runtime variables (e.g. a frame counter, nonce etc.) but could be implemented if essential.
How do I make the solution "reasonably" secure against replay, brute force, any other well known attack? Does adding new random padding bytes to each new packet help in anyway?

How to encrypt extremely small pieces of data (2 - 4 bytes)?

I'm developing a medical device that operates under extreme low-power constraints and transmits data with BLE, where every unnecessary millisecond of air time matters. I am developing a Beacon advertising protocol where sensor data is encoded directly into the advertising packet. The data I need to transmit is very simple and small, occupying only two to four total bytes. I would like to encrypt these 2-4 bytes before adding them to the advertising packet, to be decrypted by the receiving smartphone after being pulled out of the advertising packet. I'd like to keep the encrypted data as small as possible, whereas I know many algorithms create set length strings (20+ bytes).
I am currently transmitting these 2-4 bytes as hexadecimal values, to be interpreted as integer values by the receiving smartphone application. I am not overly experienced with cryptography or encryption methods, but do know that most algorithms operate on larger pieces of data. Are there any algorithms or protocols that would be appropriate for such small pieces of data? Should I "roll my own" protocol for encryption since this may be a special case?

Decipher AES128b based on a known set of raw data and encrypted block

I'm planning to use AES 128b ECB to encrypt a data block that will be transmitted over an insecurity medium.
How safe would it be if the attacker gets one (1) set of raw_data<=>encrypted_block? Is it possible to decipher the private key based only on one (1) known value?
For example:
raw_data: (data1) and encrypted_block: (encrypted1)
The attacker knows that (encrypted1) is the encryption of (data1).

Block or Stream Encryption?

I want to know if data stored in encrypted form is encrypted by block-cipher or a stream-cipher?
I have encrypted data, how do I check that it comes from a block or a stream cipher?
With only the encrypted data, there's no way to tell for sure, but a good indicator is to check the data length.
All of the common modern block ciphers (AES, Blowfish, DES, Serpent, Twofish) have block sizes of either 64 or 128 bits (8 and 16 bytes, respectively). Thus, if the encrypted data length in bytes is a multiple of 8, it's likely to be a block cipher (you have 1 in 8 probability of being wrong). if It's not a multiple of 8, you can be sure it's not a block cipher in common block modes (at most, it's a block cipher trying to emulate a stream cipher, such as in CFB mode).
Don't forget to exclude any potential file/stream headers, IVs, etc. Of course, if you do have a header, you might want to check there first to detect what cipher it's using...

Resources