Bifroest | Mr. Tines | CTC Home | CTClib | MacCTC | CTCjava | Manual |
MacCTC is a PGP-compatible Macintosh encryption program. It is not truly a version of PGP as it is a nearly complete rewrite of PGP.
Unlike most 'official' versions of PGP (since version 2.3), CTC is still commerically usable Freeware. See the legalities page for further details.
MacCTC functions as a simple text-editor at about the level of SimpleText. This allows the user to read, compose and edit text documents. This is the normal method of manipulating plaintext. The whole of the File, Edit and Windows menus are entirely straight forward text edit operations with no cryptographic functions. (Unless you count the ROT13 operation in the Edit menu as cryptographic.)
On first start up you need to select all your preferences. If you don't understand what any of the entries are about, switch on Balloon Help.
There are a bewildering variety of potential operations. However they mostly fall into two categories:-
Converting normal files into PGP-format files. This may include any mixture of MacBinary[1] conversion, compression, encryption, signature-generation and ASCII-armouring. To do any of these with MacCTC select encrypt from the encryption menu, and then select the options that you want.
Converting PGP-formated files into normal files. This may include any mixture of unArmouring, signature-verification, decryption, decompression, and MacBinary extraction. In addition, this is also the operation used to import keys.
Most encryption/decryption operations are controlled from the encryption menu. Currently the only exception is the automatic encryption of incoming Eudora e-mail.
There are three variants of the encryption operation, allowing the encryption of the current window, the current clipboard or a file. In the last case, you must select a file to encrypt with a normal file open panel. Once the document to be encrypted is selected, the Encryption panel is displayed. This allows the selection of the various encryption options.
N.B. Not all combinations are meaningful.
This selects the Symmetric Cipher used to encrypt the message itself.
There are five options here.
uudecode
.
You can only sign (with or without encryption) if you have previously selected a signing key. You select a signing key with the Signing Key sub-menu of the Keys menu.
The following output formats are available:-
This defines what (if any) preprocessing is done on the file prior to encryption.
Defines where to send the ciphertext. This may be to a file, to the clipboard or into Eudora's OUT box as mail message.
Unless using conventional encryption you must select at least one recipient.
Tip: If you select a recipient by accident, you can delete it by double clicking on the name in the recipients list.
Once you have selected all the right options click on Okay.
Decryption is simpler than encryption as the format of the file tells the program what to do with it. If it needs a pass-phrase it will ask for it. If it needs store a binary file it will ask you where to put it. If it finds text it just displays it. If it finds a key it will ask if you want it added to the key-ring. The same operation is done if Eudora receives incoming mail and MacCTC finds any PGP-format blocks.
The Eudora interface (via AppleEvents). This is the most advanced bit. If you have selected an Eudora settings file with the "Mail Program" in preferences and you then select "mail" as encryption destination, the ciphertext is automatically inserted into Eudora's OUT box addressed to the mail addresses extracted from the key Id.s.
If you have selected "Process mail on Arrival" then Eudora will send notification of all mail messages to MacCTC. When it finds any with PGP-armour in it grab the text, moves the message to the "Read Messages Folder", and then decrypts them.
In MacCTC (as in PGP) the management of session keys is automatic and not normally a direct concern of the user. Hence the user will have to generate and manage PKE key pairs. There are two key-ring files that are used for this. The Public Key ring contains all the Public keys available to the user and the Secret Key ring that contains the Secret keys.
MacCTC reads the whole of both on startup. It reads everything from the Secret Key ring and closes the file. However it doesn't load the whole of all the Public keys into memory, so it keeps that file open to refer to it. It generates a lookup table for the whole of the public key ring so that it can directly access any key if it needs it. This makes MacCTC's key access very fast.
Any key that is added during the course of the program run is initially only added to the in-memory tables. If you want to save the key permanently you have to save it to the appropriate key-ring file. MacCTC will remind you on closing if there are unwritten-back modifications to the in-memory key-rings.
To generate a new key pair, select "Generate Key" from the "keys" menu. MacCTC will generate RSA or Elliptic keys. Elliptic curve are generally only usable for communicating with other CTC implementations. MacCTC will generate normal PGP-classic dual-use keys, or later-version encrypt-only or sign-only keys. MacCTC will not encrypt with a sign-key key. However it will verify signatures with any key. (If the owner of the key has since modified to be able to sign with a formerly encrypt-only key, who am I to prevent you from verifying the signature.) I recommend against generating encrypt-only or sign-only style keys as older variants of PGP cannot use them. There are three possible prime number selection algorithms. In each case, the random starting point is selected. The top few bits are selected (partly randomly) to mean criteria, like the modulus being the requested length and the primes not being too close in value, and the rest of the starting point is fill in with good quality random data. The variation is in how we search from that value for a prime.
You must also select the length of the key and the exponent value. MacCTC currently generates keys between 512 and 4096 bits in length. Keys longer than 1024 are not handled by all versions of PGP. Keys longer than 2048 are hardly handled by anything, apart from CTC. (As far as I know CTC has no limit on key size below the PGP file-format level of 65535 bits, but there is no justification generating such keys.) I recommend the default of 1024. The length field is ignored for Elliptic curve keys. These are a uniform size.
You must also select a name for your key. I strongly recommend that this should include your e-mail address in angle-brackets "Your fullname <your-username@your.domain>". This is especially important with MacCTC as it extracts the e-mail address from the key name when sending mail. If you don't do this it will make it harder for other CTC users to send you e-mail. Once all options are selected press okay.
MacCTC will then ask you for a Pass-phrase to protect your key with twice. Make sure this is something that you can remember. Once you have done this there will be a pause of a few minutes (it varies with search algorithm, key-length, processor speed and plain luck).
MacCTC automatically signs the key and the name you have allocated to it with the key. This proves that the owner of the key intended the key to have that name. For this reason, you should always sign your own keys this way, so MacCTC does it for you.
When the key generation completes you will be asked for two file names. One for the new public key file (for circulation to friends, servers, etc.) and a key revocation certificate.
Generating a key revocation certificate (i.e. a file saying "this key is no-longer valid") on generation may seem a little odd. However it is insurance against your forgetting your pass-phrase. This file cannot compromise the key but can be used to revoke the key at any time. Keep a back-up of this file and then you will always be able to revoke the key. However don't send it to the servers until you mean it.
This is accessed (for any key) from the Edit Key...
window.
Many of the operations in this window require secret keys. If the key has
not already been decrypted MacCTC will prompt for the pass-phrase when required.
If the key itself is being modified (e.g. adding a new username, or changing
pass-phrase) then MacCTC will prompt for the pass-phrase even if it has been
given. (This is deliberate to minimise the risk of an unattended machine
being used to modify a key.) Note that while the window is open the
Signing Key
menu remains available to allow the user to select
a new signing key.
The edit key window is in three parts. The top section shows the basic attributes of the key (algorithm, size, fingerprint, etc.). As yet CTC does not manipulate secret keys that consist of separate encryption/signing keys. Accordingly it treats such public key pairs as a single key with two algorithms and sizes. There are four buttons in this section which apply to the key itself.
The middle section displays the usernames of the key. This will display up to four usernames without having to scroll, but will display any number. You may select one (but only one of these usernames).
The bottom section displays the signatures for the selected username. The first character on the line indicates the status of the signature.
At the bottom there are the following buttons.
This is displayed as the result of clicking on the 'Signature Details' button in the Edit Key Window. This is a read-only window that displays the full details of the signature.
MacCTC needs a lot of random data to generate a public-key pair. It uses a lot of random data to make the key selection as random as possible. Unlike early PGP, MacCTC does not have a randseed.bin file, as this file can be tampered with. MacCTC gets all its random data by sampling mouse position during the program run. It does this in background so if the program has been running sometime it may have enough. However if you are do a key generation immediately after starting it, it won't have enough yet. In this case, the random panel appears requesting that you move the mouse around a bit to accumulate data. It doesn't usually take long. If the bits needed count stops reducing, click the mouse in the window occasionally as you move it. (This sometimes happens; I am not sure if it is the window failing to refresh or genuninely not collecting data.)
How random data is collected is a critical subject for cryptography so I expect a lot of interest in how MacCTC does it. Simply it is by sampling mouse position, about 10 times per second. It treats each co-ordinate (X and Y) independently. First it checks if the value is close to its maximum or minimum value. That is if the cursor is on the edge of the screen. If so it rejects the value completely. Then it checks how far the value has changed since last time. If it has changed 16 pixels or more, it takes the least significant bit of the value as random. If it has changed 32 pixels or more it takes the second least significant bit as well, and so on until it takes 4 bits from a move of 128 pixels or more. It never takes more than four bits from a single value. This raw data is then hashed through MD5 to produce the bytes actually used by as random by MacCTC.
Anyone requir