{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

applied cryptography - protocols, algorithms, and source code in c

# Instead of using the bits in the tap sequence to

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bits together (see Figure 16.4), the resultant LFSR will be maximal length; it will cycle through 232 - 1 values before repeating. The C code for this LFSR looks like: int LFSR () { static unsigned long ShiftRegister = 1; /* Anything but 0. */ ShiftRegister = ((((ShiftRegister >> 31) ^ (ShiftRegister >> 6) ^ (ShiftRegister >> 4) ^ (ShiftRegister >> 2) ^ (ShiftRegister >> 1) ^ ShiftRegister)) & 0×00000001) << 31) | (ShiftRegister >> 1) ; return ShiftRegister & 0×00000001; } Figure 16.4 32-bit long maximal-length LFSR. Table 16.2 Some Primitive Plynomials Mod 2 (1, 0) (2, 1, 0) (3, 1, 0) (4, 1, 0) (5, 2, 0) (6, 1, 0) (7, 1, 0) (7, 3, 0) (8, 4, 3, 2, 0) (9, 4, 0) (10, 3, 0) (11, 2, 0) (12, 6, 4, 1, 0) (13, 4, 3, 1, 0) (14, 5, 3, 1, 0) (15, 1, 0) (16, 5, 3, 2, 0) (17, 3, 0) (17, 5, 0) (17, 6, 0) (18, 7, 0) (36, 11, 0) (68, 9, 0) (97, 6, 0) (36, 6, 5, 4, 2, 1, 0) (68, 7, 5, 1, 0) (98, 11, 0) (37, 6, 4, 1, 0) (69, 6, 5, 2, 0) (98, 7, 4, 3, 1, 0) (37, 5, 4, 3, 2, 1, 0) (70, 5, 3, 1, 0) (99, 7, 5, 4, 0) (38, 6, 5, 1, 0) (71, 6, 0) (100, 37, 0) (39, 4, 0) (71, 5, 3, 1, 0) (100, 8, 7, 2, 0) (40, 5, 4, 3, 0) (72, 10, 9, 3, 0) (101, 7, 6, 1, 0) (41, 3, 0) (72, 6, 4, 3, 2, 1, 0) (102, 6 5 3 0) (42, 7, 4, 3, 0) (73, 25, 0) (103, 9, 9) (42, 5, 4, 3, 2, 1, 0) (73, 4, 3, 2, 0) (104, 11, 10, 1, 0) (43, 6, 4, 3, 0) (74, 7, 4, 3, 0) (105, 16, 0) (44, 6, 5, 2, 0) (75, 6, 3, 1, 0) (106, 15, 0) (45, 4, 3, 1, 0) (76, 5, 4, 2, 0) (107, 9, 7, 4, 0) (46, 8, 7, 6, 0) (77, 6, 5, 2, 0) (108, 31, 0) (46, 8, 5, 3, 2, 1, 0) (78, 7, 2, 1, 0) (109, 5, 4, 2, 0) (47, 5, 0) (79, 9, 0) (110, 6, 4, 1, 0) (48, 9, 7, 4, 0) (79, 4, 3, 2, 0) (111, 10, 0) (48, 7, 5, 4, 2, 1, 0) (80, 9, 4, 2, 0) (111, 49, 0) (49, 9, 0) (80, 7, 5, 3, 2, 1, 0) (113, 9, 0) (49, 6, 5, 4, 0) (81, 4, 0) (113, 15, 0) (50, 4, 3, 2, 0) (82, 9, 6, 4, 0) (113, 30, 0) (18, 5, 2, 1, 0) (51, 6, 3, 1, 0) (82, 8, 7, 6, 1, 0) (114, 11, 2, 1, 0) (19, 5, 2, 1, 0) (52, 3, 0) (83, 7, 4, 2, 0) (115, 8, 7, 5, 0) (20, 3, 0) (53, 6, 2, 1...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern