Wikipedia:Reference desk/Archives/Computing/2014 May 23

Computing desk
< May 22 << Apr | May | Jun >> May 24 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 23 edit

PARI/GP error regarding impossible inverse edit

I am trying to run the following in PARI/GP:

forprime(n=2, 1e6, (m=n && while(Mod((2^3510-1), m)==0, print1(n, ", ") && m=m*n)))

What I want to do is to find the prime factors of 23510-1 with repeated factors reported as often as the exponent in the highest power of that factor dividing 23510-1. It currently quits with an error saying Mod: impossible inverse in dvmdii: 0. Is this PARIs way of saying a division by 0 error occurs or what does this message mean? -- Toshio Yamaguchi 08:50, 23 May 2014 (UTC)[reply]

I'm not sure how your code is interpreted but here is a way to do what you want:

forprime(n=2, 1e6, m=n; while(Mod((2^3510-1), m)==0, print1(n, ", "); m=m*n))

Here is a faster way, especially when the exponent becomes larger:

forprime(n=2, 1e6, m=n; while(Mod(2,m)^3510-1==0, print1(n, ", "); m=m*n))

The latter form enables PARI/GP to use modular exponentiation. For the first form there is no computational reason to use Mod and you could just have written:

forprime(n=2, 1e6, m=n; while((2^3510-1)%m==0, print1(n, ", "); m=m*n))

PrimeHunter (talk) 13:54, 24 May 2014 (UTC)[reply]
@PrimeHunter: Thanks. Your second way is exactly what I want. -- Toshio Yamaguchi 15:27, 24 May 2014 (UTC)[reply]

What can the sender know about me when I open an e-mail? edit

I would guess at a minimum that the sender would know it is a valid address, but what else (wondering, of course, how I could be harmed)? --173.30.53.201 (talk) 18:47, 23 May 2014 (UTC)[reply]

  • See Email_tracking. The knows nothing if you are using a reliable provider like Gmail (do not know about Yahoo or MSN). Gmail diables all options like read receipts, unique image tracking etc. Some sender's track link clicking, I have also seen some sender use goo.gl or bit.ly URLs to see if those have been clicked. TitoDutta 19:26, 23 May 2014 (UTC)[reply]
It isn't true that Gmail disables 'unique image tracking', unless you have a very odd definition of that. Since the end of last year, all they do by default is proxy and cache requests (with an associated malware scanner). This prevents the tracker gaining any information about the client opening the image (user agent, IP etc) but doesn't prevent them knowing the image has been accessed [1] [2] [3] [4]. Also, this only works if you're using Gmail through the webinterace or one of the Gmail client apps, if you're using IMAP or POP, you still be accessing the image directly, depending on your client settings [5]. From what I understand, they only proxy and cache if you request the image meaning the time and if you open the image will still be known. Although since they possibly cache long term, or at least disable any cache limitations [6], it often won't be known if you open the image repeatedly or only once (although I'm not sure how many stand alone email clients respect server cache settings anyway).
P.S. I also came across [7] [8] which are interesting if you care about this sort of thing. These do mention Google does actual still disable automatic image loading for senders it considers suspicious (may be also servers?). And it's worth remembering all these discussions are from somewhat reputable email marketting companies. The spammers and other blackhats are obviously not talking so openly about what they're doing. Generally though, it seems clear Google doesn't consider unique image tracking inherently harmful, just some forms of it. If you disagree either change your account settings or use another provider.
Nil Einne (talk) 18:53, 26 May 2014 (UTC)[reply]
Probably the most common way is to use HTML email and embed an image of some kind into the mail. Sometimes this is a 1x1 pixel completely transparent dot (this is sometimes called a "web-bug"). So, the bad guy might send me an email with an embedded image named "http://badguy.com/validate/steve_at_sjbaker_dot_org.gif" - and when I view that email, my browser fetches that image in order to display it. Then the bad guy's server logs all downloads from the "validate" directory...the result is a long list of email addresses that correspond to people who opened that email. The only way to prevent this is to either have your mail program refuse to read HTML email (increasingly a pain in the butt!) - or to disable image downloads (also a pain in the butt) - or to 'whitelist' people from whom you'll download images (which is what I do).
Of course it doesn't have to be an image - it could be a sound snippet or anything that the browser will grab from the server.
SteveBaker (talk) 15:46, 26 May 2014 (UTC)[reply]