On Sep 17, 2007, at 8:38 PM, David Stahl wrote:
> I need to generate large, random integers and tried to use > ntl.ZZ_random(). Unfortunately the output is not recognized by sage > as an integer and I don't see any information in the reference guide > about such a conversion. Any guidance would be appreciated. Thank > you. That function is returning an NTL ZZ object, which for some strange reason does not coerce into the SAGE Integer type. This is a bug, I have reported it as: http://www.sagemath.org:9002/sage_trac/ticket/684 As a workaround you could use sage: ZZ.random_element(2^100) 74244657548023121724486721952 This does not use NTL though. I believe the NTL documentation claims that its random number generation is cryptographically secure, but I don't know if ZZ.random_element() is supposed to be cryptographically secure. david --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---