This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Credit: https://gist.github.com/dlubarov/9341afc247afbfc798be847a2f59f6a8 | |
| p = 2^8 + 1 | |
| F = GF(p) | |
| g_full = F.multiplicative_generator() | |
| # A generator of an order n subgroup (undefined if one doesn't exist). | |
| def g_n(n): | |
| return g_full^((p - 1) / n) |