mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
document tweak
This commit is contained in:
parent
2080ee1d7d
commit
e67526ee4d
2 changed files with 5 additions and 1 deletions
|
@ -332,6 +332,8 @@ uint8_t lfsr_rollback_byte(struct Crypto1State *s, uint32_t in, int fb) {
|
|||
uint32_t lfsr_rollback_word(struct Crypto1State *s, uint32_t in, int fb) {
|
||||
|
||||
uint32_t ret = 0;
|
||||
// note: xor args have been swapped because some compilers emit a warning
|
||||
// for 10^x and 2^x as possible misuses for exponentiation. No comment.
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 31), fb) << (24 ^ 31);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 30), fb) << (24 ^ 30);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 29), fb) << (24 ^ 29);
|
||||
|
|
|
@ -103,6 +103,8 @@ uint8_t crypto1_byte(struct Crypto1State *s, uint8_t in, int is_encrypted) {
|
|||
}
|
||||
uint32_t crypto1_word(struct Crypto1State *s, uint32_t in, int is_encrypted) {
|
||||
uint32_t ret = 0;
|
||||
// note: xor args have been swapped because some compilers emit a warning
|
||||
// for 10^x and 2^x as possible misuses for exponentiation. No comment.
|
||||
ret |= crypto1_bit(s, BEBIT(in, 0), is_encrypted) << (24 ^ 0);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 1), is_encrypted) << (24 ^ 1);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 2), is_encrypted) << (24 ^ 2);
|
||||
|
@ -137,7 +139,7 @@ uint32_t crypto1_word(struct Crypto1State *s, uint32_t in, int is_encrypted) {
|
|||
ret |= crypto1_bit(s, BEBIT(in, 28), is_encrypted) << (24 ^ 28);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 29), is_encrypted) << (24 ^ 29);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 30), is_encrypted) << (24 ^ 30);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 31), is_encrypted) << (24^ 31);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 31), is_encrypted) << (24 ^ 31);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue