![]() | 1 | initial version |
If you want to work mod 256, you should work with Integers(256)
, not GF(256)
. (The first of these is the ring Z/256
, the second is the field with 256 elements.)
sage: matrix(Integers(256), [1,2,3,4])
[1 2 3 4]
IntegerModRing(256)
is a synonym for Integers(256)
, by the way.
![]() | 2 | No.2 Revision |
If you want to work mod 256, you should work with Integers(256)
, not GF(256)
. (The first of these is the ring Z/256
, the second is the field with 256 elements.)
sage: matrix(Integers(256), [1,2,3,4])
[1 2 3 4]
sage: matrix(Integers(256), [254, 255, 256, 257])
[254 255 0 1]
(edited to add the second example)
IntegerModRing(256)
is a synonym for Integers(256)
, by the way.