The ExactTarget SFMC Public Key referred to in their FTP instruction guide points to a key that doesn't seem to be set up properly for encryption of FTP files.

$ curl https://members.exacttarget.com/Content/Subscribers/SubsLists/publickey.txt > salesforce_publickey.txt
$ pgpdump salesforce_publickey.txt | grep Flag
  # Notice: The encrypt message and encrypt storage flags are not set

While gpg has no problem encrypting using this public key:

$ echo secret message > message.txt
$ gpg --recipient-file salesforce_publickey.txt --output message.txt.pgp --encrypt message.txt
  # Success!  See message.txt.pgp

Other implementations that are apparently more circumspect don't allow encryption without the appropriate flags set. My environment does not include gpg, so I've been working with a pure-python implementation instead:

import pgpy
publickey = pgpy.PGPKey.from_blob(bytearray(open('salesforce_publickey.txt').read(), 'utf-8'))[0]

publickey.encrypt('secret message', user=publickey.userids[0].email)
>>> PGPError: Key 64C4D5362A88CF19 does not have the required usage flag EncryptStorage, EncryptCommunications

Since that key only allows Certify, not Encrypt.

So... my question is, am I missing something? There don't seem to be any subkeys included at that link. keys.gnupg.net points to several other candidate public keys, but the only one that matches the FTP instruction's fingerprint lacks that flag as well. Has anyone else tried encrypting with that key using other applications?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.