Alarm Sensor Module  0.1
⇒ back to Project Page

◆ sym_encrypt_buffer()

uint8_t sym_encrypt_buffer ( uint32_t *  input_buffer,
uint32_t *  output_buffer,
uint8_t  buffer_length 
)

Performs a symmetric encryption of a stream of 32 Bit buffer elements. Each buffer element is encrypted with the complete key (all sub keys). In addition to that a cipher block chaining is used to reduce repetition of pattern.
The keys are located in the file encryption_keys.h. The number of keys (or the key length) is defined by NUMBER_OF_SYM_KEYS in the same file.

Remarks
Recommendation: Use CRC as first block to use the cipher block chaining in an optimal way.
Parameters
[in]input_buffercontains the stream or buffer with input values which will be encrypted
[in,out]output_bufferpointer to the output buffer with the encrypted values
[in]buffer_lengthnumber of buffer elements to encrypt
Date
  • Created 20.01.2019
  • Modified 20.01.2019
Author
Michael Skutek, micha.nosp@m.el@s.nosp@m.kutek.nosp@m..de

Definition at line 195 of file encryption.c.

Referenced by main().

Here is the caller graph for this function: