0
\$\begingroup\$

I am currently working in Logisim and was wondering if I can design some ciphers in the same. One such cipher is PRESENT cipher which is essentially a block cipher. I did get that I need to design the S and P boxes for the same but I am having difficulty starting with the same. The issue is that I am not sure which electronic parts I should use to get the desired output. I'd appreciate it if I could get a starting point for the cipher which would then make things a bit more clearer to me. Thanks!

\$\endgroup\$
0
\$\begingroup\$

Since you are asking how to create the S-box of the linked document: This S-box is a lookup table of 4 bits input to 4 bits output.

The P-layer is "just" wiring. I would generate a sub-circuit for this.

Please be aware that Logisim is limited to 32 bits per multibit-wire. You will need multiple wires.


Alternative 1:

Use the ROM component with 4 bits input and 4 bits output for the S-box.


Alternative 2:

You can use the Combinatorial Analysis window to enter the translation table for the S-box. Then let Logisim build the circuit.

Use it as a component for your main circuit.


Note: Admittedly it is simpler to use a high level hardware description language. To look into the bits, it is still a good exercise to do this on lower levels. Some years ago I built a simple 4-bit computer with Logisim.

\$\endgroup\$
-1
\$\begingroup\$

Implementing cryptographic components in hardware is hard enough – use a hardware description language like Verilog or VHDL, or the more modern Chisel or migen.

You'd be crazy and, if I was your advisor, prone to wasting time, to try and implement something of that complexity in Logisim GUI. Use logisim-evolution (logisim itself is pretty dead), and place a "VHDL component" or whatsitcalled. Implement your S-Box using VHDL (or something that compiles to VHDL), and simulate it with the tools of the digital design trade. Logisim is a purely educational tool for small circuits.

Still, this is not really a useful thing to do. S-Boxes, even trivial ones, will be too complex to understand visually.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.