[viff-devel] The value of Zp

Martin Geisler mg at daimi.au.dk
Wed Mar 25 16:24:00 PDT 2009


"Atle Mauland" <atlema at stud.ntnu.no> writes:

> Hi all!
>
> Is there any way of getting the value of the Zp-variable as an
> integer? I need to calculate some values mod p...

You can access the modulus attribute:

>>> from viff.field import GF
>>> Zp = GF(131)
>>> Zp.modulus
131

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.viff.dk/pipermail/viff-devel-viff.dk/attachments/20090326/7421ac14/attachment.pgp>


More information about the viff-devel mailing list