The advantage of modular arithmetic, e.g. cyclic groups?

Click For Summary

Discussion Overview

The discussion revolves around the advantages of modular arithmetic in the context of encryption, particularly focusing on finite cyclic groups and rings. Participants explore the mathematical foundations of encryption algorithms, their practical implications, and the technical details of implementations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants note that modular arithmetic is heavily relied upon in encryption due to its properties that make encryption feasible while keeping decryption difficult.
  • One participant suggests that the practicality of modular arithmetic is a key reason for its use in cryptographic algorithms, as it allows for efficient encryption and complicates decryption.
  • Another participant highlights the political aspects of cryptography, mentioning that the longevity of algorithms like RSA is influenced by community consensus and implementation checks.
  • There is a discussion about the limitations of older algorithms, such as MD5, and the transition to more secure alternatives like SHA-2.
  • One participant explains that using modular arithmetic in RSA limits the size of numbers during encryption and decryption, which can be beneficial for hardware implementations.
  • Another participant delves into the mathematical intricacies of finite fields and sub-field mapping, discussing the optimization of gate counts in AES encryption.

Areas of Agreement / Disagreement

Participants express a range of views on the effectiveness and practicality of different encryption algorithms, with no clear consensus on the best approach or algorithm. The discussion remains unresolved regarding the optimal use of modular arithmetic in various contexts.

Contextual Notes

Some participants acknowledge the complexity of the mathematics involved in encryption algorithms, indicating that there are unresolved aspects related to the choice of primitives and the optimization of implementations.

Who May Find This Useful

This discussion may be of interest to individuals exploring the mathematical foundations of cryptography, those involved in the implementation of encryption algorithms, and anyone curious about the interplay between theory and practical applications in security.

nomadreid
Gold Member
Messages
1,773
Reaction score
256
In starting to look into the mathematical side of encryption , I note the heavy dependence upon modular arithmetic. What is the advantage is this? For example, why are finite cyclic groups and rings preferable? Note: I know zilch about programming; I am approaching it from the mathematical side.
 
Technology news on Phys.org
I do not know exactly what you are asking for. But, if we start from base requirements, for public key crypto let's try this:

Crypto algorithms get vetted by the community. That means everybody understands fully how the algorithm works. So to provide safety decryption has to be unfeasible in terms of 'computing power' required for a successful brute force attack. Obviously, no cracking algorithm should be found to exist that greatly reduces the computing effort to successfully attack. Over time algorithms have gone out of use generally because someone found a crack or because brute force analysis became feasible.

One time pad (Shannon) is the only (a theorem) proven to be impossible to crack. But essentially useless on a practical basis.

Is this the direction you want to go - practicality? Which is an answer to your question: Why this type of algorithm is chosen?
 
Last edited:
  • Like
Likes   Reactions: nomadreid
Thanks for the reply, jim mcnamara. If practicality is the reason why modular arithmetic has been chosen, then yes, that would be the way I would want to go, and details would be appreciated. So, if I understand it, appropriate formulations in terms of modular arithmetic are possible for today's computers to encrypt easily but difficult to decrypt , as opposed to formulations in terms of simply the integers that would be either easier than the ones in modular arithmetic to decrypt, or outside the range of today's computers to encrypt. I am not yet quite sure why this should be the case, though.
 
crypto has a political aspect to it. Step one is get agreement that, yes, the algorithm works as required. Next step is a check on the implementation (practicality, I guess). We still use RSA which came out in the early 1990's. Not because it is great but because lots of older systems have and it can be expensive to upgrade to something else. So, what happens is, Ron Rivest, the principal author of RSA, has tried some additional tweaking to get a few more good years out of it. RSA keys are standard for ssh-keys (passwordless access, key exchange). The ssh protocol supports it. (Note RSA is used in two contexts, and with two separate alogithms: asymmetic encryption and digital signatures (http://en.wikipedia.org/wiki/Digital_signature)

So if my vendors use RSA keys and create public RSA keys for the asymmetric encryption applications here, we use RSA. Is it the best choice? No.

Some things in crypto do get blown away to an extent. The MD5 hash algorithm is pretty much out of the picture, and SHA-2 is now being used in it's stead. Someone found a crack for MD5, and there was a mass exodus.

So. I am oversimplifying this stuff. And cryptoanalysts will get heartburn reading it.
Start with this:
http://en.wikipedia.org/wiki/Public-key_cryptography
http://en.wikipedia.org/wiki/Elliptic_curve_cryptography
http://en.wikipedia.org/wiki/Key_exchange

These are all general, kinda limited links, but if you have questions I might be able to help a little. But remember this is Commerce and Government, not necessarily Mathematics
 
  • Like
Likes   Reactions: nomadreid
In the case of RSA, using modular arithmetic limits the size of the "numbers" used during encryption and decryption. In the case of AES encryption, when it is implemented in hardware, perhaps 10 more more encrypters operating in parallel, reducing the gate count is important. Part of AES encryption involves the Rijndael_S-box (wiki link), finding the 8 bit value (1/x) modulo a 9 bit polynomial (1 bit coefficients, hex 11b) which is implemented as a 256 byte lookup table for software, but for hardware implementation, gate count has been reduced well below that of the equivalent of a 256 byte lookup table by using an advanced method called sub-field mapping where the 8 bit field is mapped into two 4 bit fields which in turn are mapped into four 2 bit fields.
 
Last edited:
  • Like
Likes   Reactions: nomadreid
Thanks again, jim mcnamara, and thanks rcgldr. You have both given me much to munch on, and I shall be working my way through your explanations and links.
 
If you want to go bonkers on the sub-field mapping and related finite field stuff ...

For a finite field module a prime number p, there are primitives, calling one of them e, where every non-zero number in the field can be represented as e^i % p, where i goes from 0 to p-2. e^(p-1)%p = 1. For example, consider the finite field modulo 5, then all non-zero numbers can be powers of 2:

{2^0 % 5 = 1, 2^1 % 5 = 2, 2^2 % 5 = 4, 2^3 % 5 = 3} (this wraps around at 2^4 % 5 = 1).

or powers of 3:

{3^0 % 5 = 1, 3^1 % 5 = 3, 3^2 % 5 = 4, 3^3 % 5 = 2} (this wraps around at 3^4 % 5 = 1).

For an 8 bit field modulo a 9 bit "prime" polynomial (1 bit coefficients, add and subtract are effectively replaced by xor), there are also primitives. Normally a polynomial where 2 (binary 10) is a primitive is chosen, but AES uses a polynomial where 2 is not a primitive (more on this below).

A simple example of sub-field mapping:

http://rcgldr.net/misc/m8to44.doc

As mentioned, AES uses a 9 bit polynomial where 2 is not a primitive, but typically the 4 bit sub-field mapping will use polynomials x^2 + ax + b where 1x + 0 is a primitive. A brute force search for a combination of primitive 'e' for the 9 bit polynomial, 'a' and 'b' for a potential "compatable" 4 bit sub-field polynomial x^2 + ax + b to map first to two 4 bit sub-fields and then again to a 2 bit sub-field polynomial x^2 + x + 1 to map to four 2 bit sub-fields is done, looking for the combination that results in the fewest number of gates. Link to a pdf file about optimizing an "s-box". The point isn't to understand all the complex math in the document, but to note the effort put into this to reduce the gate count by about 20% (since there can be 10 or more s-boxes on a AES device, the gate count is important).

http://www.iacr.org/archive/ches2005/032.pdf
 
Last edited:
  • Like
Likes   Reactions: nomadreid
Hey, rcgldr, great stuff in those two documents, and in your text. I really like that: documents written in information science that clearly discuss the mathematics involved, not just giving a bunch of programs. Just the approach I need. Thanks very much!
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
6K
Replies
3
Views
3K
  • · Replies 64 ·
3
Replies
64
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 50 ·
2
Replies
50
Views
18K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K