data encryption standard


I am implementing data encryption standard using verilog. can anyone suggest efficient algorith to implemnt data encryption standard ( especially S-box).

Reply to
Loading thread data ...

The S-Boxes are the easy part. They are just LUTs.

Reply to
Ray Andraka

I am implemnting S-box by using case statement.

6'b000000: SB[1]=4'd14; 6'b000010: SB[1]=4'd4; 6'b000100: SB[1]=4'd13; 6'b000110: SB[1]=4'd1; 6'b001000: SB[1]=4'd2; 6'b001010: SB[1]=4'd15; 6'b001100: SB[1]=4'd11; 6'b001110: SB[1]=4'd8; 6'b010000: SB[1]=4'd3; 6'b010010: SB[1]=4'd10; 6'b010100: SB[1]=4'd6; 6'b010110: SB[1]=4'd12; 6'b011000: SB[1]=4'd5; 6'b011010: SB[1]=4'd9; 6'b011100: SB[1]=4'd0; 6'b011110: SB[1]=4'd7; 6'b000001: SB[1]=4'd0; 6'b000011: SB[1]=4'd15; 6'b000101: SB[1]=4'd7; 6'b000111: SB[1]=4'd4; 6'b001001: SB[1]=4'd14; 6'b001011: SB[1]=4'd2; 6'b001101: SB[1]=4'd13; 6'b001111: SB[1]=4'd1; 6'b010001: SB[1]=4'd10; 6'b010011: SB[1]=4'd6; 6'b010101: SB[1]=4'd12; 6'b010111: SB[1]=4'd11; 6'b011001: SB[1]=4'd9; 6'b011011: SB[1]=4'd5; 6'b011101: SB[1]=4'd3; 6'b011111: SB[1]=4'd8; 6'b100000: SB[1]=4'd4; 6'b100010: SB[1]=4'd1; 6'b100100: SB[1]=4'd14; 6'b100110: SB[1]=4'd8;

Is this efficient way?

Or is any other method t o implemnt LUT

Reply to

Depends... Synplify will turn that into a ROM or LUTs depending on what it thinks is best...


Reply to
Simon Peacock

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.