Peter Meyer has been programming computers for much of the last 37 years and has worked as an employee in American and European companies, a consultant and an independent software developer, writing software in FORTRAN, BASIC, 6502 Assembler, dBASE/Foxbase, C and Visual Basic. In recent years he has concentrated on developing Windows software which he sells through his [http://www.hermetic.ch/ |Hermetic Systems website].

This interview was conducted, with the kind assistance of Mr. Meyer, for the C++ Home website, by Ilia Yordanov. Most of the questions were asked by our visitors.

1. When did you start as a programmer?

I started as a programmer by accident, when in 1964 I applied for a 1-year job with the post office, which turned out to be a job as a computer programmer, forecasting future requirements for telephone cables. This was just after FORTRAN IV had been invented, and hardly anyone knew what a computer programmer did. I learnt on the job. I would write FORTRAN code on paper sheets, which were converted into punched cards which were fed into an IBM mainframe computer, and the output would come back next day. Sometimes the output was just “SYNTAX ERROR”. I later worked as a FORTRAN programmer during university vacations. I did almost no programming during the 1970s but in 1980 I purchased an Apple ][+ computer and became an Apple developer. In the mid-1980s I moved to IBM PC programming as an employee of an insurance company, and in 1987 I learnt C (drawing on my experience as a BASIC programmer). I found C to be an excellent general-purpose procedural programming language and have programmed with C ever since. I have looked at C++ but I don't like it and I never use it. Two years ago I started programming in Visual Basic, because I wanted to convert my C programs, written for the DOS operating system, to Windows. I have found Visual Basic to be a good development environment for Windows programming, and it is not difficult to learn.

2. What is your current occupation?

I mainly work on developing and maintaining my Hermetic Systems website, where I sell five Windows programs that I have developed in the last two years, plus four older programs which run under both DOS and Windows. These programs concern calendar conversion, encryption, HTML programming and prime numbers. My website also has numerous articles on these topics (apart from the user manuals for the software, which are all online), and in fact it was created first as a place to publish these articles (mostly concerned with calendars, such as the Maya Calendar) and only later turned into a commercial website. I have a number of other software projects that I'd like to work on, some related to encryption and some not, but at present I find that attending to the marketing side, and general administration of my website, doesn't leave much time for getting into new software development.

3. What do you think is the best way to learn and understand Windows programming?

As I said, C is an excellent procedural programming language (procedural programming is where you have input data and you process that data in some way to produce some output) but even an expert C programmer cannot write an event-driven program with a graphical user interface without making use of an extensive library of low-level functions, such as MFC. If one wants to write state-of-the-art Windows programs then one has to learn MFC and object-oriented programming, but it is quite possible to write good Windows software using only Visual Basic. But although VB is good for user interface design, it is too slow for number-crunching applications (such as encryption software). However it is possible to use VB for the user interface and C for the heavy computation behind the scenes. This is done by writing the number-crunching routines as C DLLs and linking them to the VB front-end. The techniques for doing this can be found in the VB user guide, in some books and by searching the articles in Microsoft's knowledge base on their website. A book I have found useful for learning and using VB is Brian Overland's Visual Basic 6 in Plain English (IDG Books Worldwide, Inc.).

4. Which do you think is the most secure encryption algorithm at present? 3-DES, IDEA, RSA, DSS, etc.?

The concept of "most secure" is not clear. Basically an encryption algorithm is secure if it can withstand attempts to break it, and so if you have two different encryption algorithms, and there have been no attempts at breaking either of them, then it is impossible to say which is more secure. Of course, some encryption algorithms are so weak that simply inspecting them will show you how to break them. An example is an algorithm that replaces each byte by some other byte in a one-to-one correspondence. This preserves the character frequencies of natural language text, so if you know that the plaintext is English then you can be fairly sure that the most frequent byte value in the ciphertext corresponds to 'e'. As for the strong encryption algorithms, DES in its simplest mode ("electronic code book") can now be broken by a brute force attack, whereas triple-DES, IDEA, RSA, etc., cannot (if the keyspace is large enough, when variable-length keys are possible), and these algorithms have also withstood attempts by cryptanalysts over many years to find weaknesses. So one can say they are secure (against presently known attacks), but not that any of them is "the most secure".

5. What is the point of using many different algorithms as all appear to be as secure as the length of the key when using a brute force attack? Once you find the key, no matter what algorithm was used, the data has been decrypted.

There are many different encryption algorithms because there have been many people who were intrigued by the challenge of inventing a method for hiding data from those not meant to read it, and many different methods have thus been invented. As the weaknesses of earlier methods emerged from attempts to crack them, new systems were developed which were not vulnerable to the old attacks. Mechanical devices allowed more complex methods, and the introduction of digital computers has greatly aided the invention of encryption algorithms, although the public key methods all rely on mathematical knowledge rather than mere computational complexity. A good cryptosystem will use a keyspace which is much too large to allow a brute force attack to succeed (since the time required will be many times the life of the universe), so all good cryptosystems are equal in this respect. But there is a basic difference between symmetric and asymmetric systems, that is, whether the decryption key is the same (symmetric) or different from (asymmetric) the encryption key. Asymmetric systems (public key systems) allow the transmission of an encrypted message to a recipient without the need for transmission of the encryption key, and so are far more useful for secure transmission of messages than are symmetric systems. But symmetric systems tend to be much faster than asymmetric ones, so if one's purpose is simply to encrypt data for secure storage then a symmetric key system is preferable.

6. Do you have any statistical information concerning the best results for a particular kind of processor or computer for decrypting a message encrypted using strong encryption? I've heard that there are special processors that can decrypt a message encrypted using a 3x56 bit key in less than two seconds. Do you think this is true?

I have no such statistical information. It's true that hardcoding the decryption algorithm in silicon greatly increases the speed with which you can test keys, so special chips have been devised (no doubt the NSA has a whole range of these). But this will work only for systems such as DES in its simplest form where the keyspace is a mere 2^56, and so can be exhausted by a brute force attack in, say, a matter of hours. I don't believe that triple-DES is vulnerable to this sort of attack, but if new technologies allow increases in processing speed of many orders of magnitude then even triple-DES may become vulnerable to a brute force attack.

7. What do you think is the minimum keysize in bits to be sure that your data will be secured — 2028, 4056 or even more?

Keysize determines only theoretical security by making the keyspace so large that it can never be entirely searched. In practice security depends on many other factors, some of which are extrinsic to the encryption algorithm itself. For example, triple-DES is not secure if you use it to encrypt your data but then write the encryption key on a piece of paper which you hide under your keyboard where it can be found by the cleaning lady. A theoretically secure cryptosystem is only secure if it is used with proper attention to practical information leakage. For example, you may use some piece of encryption software to encrypt a file, but that software may produce the ciphertext while still leaving the plaintext on the disk, even if it seems that the plaintext file no longer exists. By the use of so-called "forensic software", which searches disk sectors, it is easy to recover the plaintext. Good encryption software must overwrite the plaintext after encryption. Another source of leakage is the operating system being used, especially if it is any version of Windows. Whenever Windows "deletes" a file it simply unlinks the data sectors from the file directory, without overwiting the data. So if, for example, you have a file of encrypted data, you decrypt it to a plaintext file (leaving the original ciphertext intact), view the plaintext, then delete it, the plaintext is still lying around in the disk sectors where it can be discovered by forensic software. In such a case one has to use software which will purge the plaintext, that is, will overwrite the data (many times) so that it is destroyed and can't be recovered.

8. As far as I know it is possible to get information about the encryption key by measuring the time that is needed to encrypt a message using the RSA algorithm. Is that a real threat?

I don't believe so. Suppose that you are using RSA with a 512-bit key, so that there are 2^512 possible keys, that is, about 10^154. Let's say you can measure encryption time to the nearest millionth of a second, and that the maximum encryption time (using all possible keys and the same computer) for the message is 50 minutes. Then the number of possible encryption time measurements is 50x60x1,000,000 = 3,000,000,000, so (assuming for the sake of argument that any one encryption time measurement is associated with about as many keys as any other, though in fact this is not likely to be the case) knowing the encryption time for the message encrypted with a particular key would reduce the keyspace to about (10^154)/(3x10^9), that is, 3.3x10^144, which is still too large for a brute force attack. And in any case you are not likely to have any information about the time taken to encrypt a message, and this will differ on different machines anyway.

9. Do you believe that SSL is safe enough for websites?

I haven't looked into the details of SSL or how it is used, so I couldn't say, except of course that security depends on the length of the key, and a 64-bit key may be insecure whereas a 512-bit key may be secure (at present).

10. Can you recommend good online sources for encryption documentation?

Sure. You can start with my website. To begin with there's an [http://hermetic.ch/crypto/intro.htm|Introduction to the Use of Encryption ](there’s also a German version, [http://hermetic.ch/crypto/introg.htm|Eine Einfьhrung in die Anwendung der Verschlьsselung]). Some parts of [http://hermetic.ch/crypto/me6eman/me6eman.htm|the user manual for Cryptosystem ME6 ] will be of interest even if you don’t have the software itself. Then the material on the page [http://hermetic.ch/crypto/cryplynx.htm|Crypto Links], and the pages it links to, may be of interest. The final links on this page take you to crypto link farms, such as Peter Gutmann’s [http://www.cs.auckland.ac.nz/~pgut001/links.html|Security and Encryption-related Resources and Links ] and [http://www.austinlinks.com/Crypto/|Quadralay's Cryptography Archive], so there’s a lot of online material available. Much of it is good, although vendors of commercial encryption software often exaggerate the virtues of their products, so one has to read what they say with a critical eye. You should ask yourself if they provide any evidence or reasoning in support of their claims.

11. What should one do if one believes that one has invented a new and strong encryption algorithm? Whom should one inform and can one make any money from the invention?

As noted above, there are two kinds of encryption algorithm, symmetric and asymmetric (public key). The latter all rely on mathematical research, so if you have invented a new asymmetric encryption algorithm then you are a mathematician and your mathematical colleagues will review your work. If the method is good (and has not already been discovered) then probably the world will come to you begging to use it. If you have invented a new symmetric encryption algorithm then the situation is different, since no mathematics may be involved, but the effectiveness may lie in the computational complexity of the encryption process. For example, the security of the algorithm used in [http://hermetic.ch/crypto/me5.htm|Cryptosystem ME6 ] relies on the irreversibility of the MD5 message digest algorithm, as explained in [http://hermetic.ch/crypto/me6eman/05chap_2.htm|Chapter 2] of the user manual. In a case such as this the world will usually ignore your invention unless you happen to be an academic cryptographer (with a PhD and articles published in cryptographic journals) or an employee (or founder) of a company that is willing to bring your invention to market (which usually requires a major financial investment). Since an encryption algorithm is a device intended to achieve a certain end (secure hiding of data) you can try to patent your algorithm, but this usually requires a patent attorney, is expensive, and is only recommended if you’re sure that the algorithm can be exploited commercially. To tell the world of your invention you can approach the editors of cryptographic journals, both academic and trade (such as [http://www.infosecnews.com/|InfoSecurity Magazine]) to see if they are interested. To bring a commercial product to market you can try to find some entrepreneur who might be interested in financing this, but don’t expect any miracles. Or (as I have done) you can write encryption software implementing your new encryption algorithm and present evidence to the world of why it is secure, good and useful, and hope that people will realize what a fine thing it is (for its intended purpose, in this case, secure storage of data) and buy it.

12. Any other advice for aspiring computer programmers?

World War III seems to have begun in October 2001, so unfortunately one’s main concern has now to be less how to develop one’s career as a computer programmer and more how to survive the next five years or so. One should think carefully about what the present military activity could lead to, and which places might be safer than others in the coming years. Of course, one has to eat, and computer programming is still a good way to make a living, but in times of war societies have different priorities than in times of peace, so things will become a lot different to what we have been used to. Everyone has to ensure their survival in their own way, but those who think in advance about what might happen will have a better chance of living to see what sort of postwar world comes about.

Thank you Mr. Meyer!

You can visit Peter Meyer’s Hermetic Systems website at [http://hermetic.magnet.ch/|http://hermetic.magnet.ch/]

Tags: , , ,

3 Responses to “Encryption”

  1. AMAR says:

    give me code of rsa algoritham in c++

  2. Ex Girlfiend says:

    Hey, nice tips. Perhaps I’ll buy a bottle of beer to that man from that forum who told me to go to your blog :)

  3. 蛙鏡 says:

    woot, thankyou! I finally came to a site where the webmaster knows what they’re talking about. Do you know how many results are in Google when I search.. too many! It’s so annoying having to go from page after page after page, wasting my day away with thousands of people just copying eachother’s articles… bah. Anyway, thankyou very much for the info anyway, much appreciated.

Leave a Reply

You must be logged in to post a comment.