Transcription

3 Random Number Generation Introduction The best means of obtaining unpredictable random numbers is by measuring physical phenomena such as radioactive decay, thermal noise in semiconductors, sound samples taken in a noisy environment, and even digitised images of a lava lamp. However few computers (or users) have access to the kind of specialised hardware required for these sources, and must rely on other means of obtaining random data. The term practically strong randomness is used here to represent randomness which isn t cryptographically strong by the usual definitions but which is as close to it as is practically possible. Existing approaches which don t rely on special hardware have ranged from precise timing measurements of the effects of air turbulence on the movement of hard drive heads [1], timing of keystrokes as the user enters a password [2][3], timing of memory accesses under artificially-induced thrashing conditions [4], timing of disk I/O response times[5], and measurement of timing skew between two system timers (generally a hardware and a software timer, with the skew being affected by the 3-degree background radiation of interrupts and other system activity)[6][7]. In addition a number of documents exist which provide general advice on using and choosing random number sources [8][9][10][11][12]. Due to size constraints, a discussion of the nature of randomness, especially cryptographically strong randomness, is beyond the scope of this work. A good general overview of what constitutes randomness, what sort of sources are useful (and not useful), and how to process the data from them, is given in RFC 1750 [13]. Further discussion on the nature of randomness, pseudorandom number generators (PRNG s), and cryptographic randomness is available from a number of sources [14][15][16]. Unfortunately the advice presented by various authors is all too often ignored, resulting in insecure random number generators which produce encryption keys which are much, much easier to attack than the underlying cryptosystems they are used with. A particularly popular source of bad random numbers is the current time and process ID. This type of flawed generator, of which an example is shown in Figure 1, first gained widespread publicity in late 1995 when it was found that the encryption in Netscape browsers could be broken in around a minute due to the limited range of values provided by this source, leading to some spectacular headlines in the popular press [17]. Because the values used to generate session keys could be established without too much difficulty, even non-crippled browsers with 128-bit session keys carried (at best) only 47 bits of entropy in their session keys [18]. a = mixbits( time.tv_usec ); b = mixbits( getpid() + time.tv_sec + ( getppid() << 12 ); seed = MD5( a, b ); nonce = MD5( seed++ ); key = MD5( seed++ ); Figure 1: The Netscape generator Shortly afterwards it was found that Kerberos V4, whose generator is shown in Figure 2, suffered from a similar weakness (in fact it was even worse than Netscape since it used random() instead of MD5 as its mixing function) [19]. At about the same time, it was announced that the MIT-MAGIC-COOKIE-1 key generation, which created a 56-bit value, effectively only had 256 seed values due to its use of rand(), as shown in Figure 3. This flaw had in fact been discovered in January of that year but the announcement was delayed to allow vendors to fix the problem [20]. A variant of this generator was used in Sesame (which just used the output of rand() directly), the glibc resolver (which uses 16 bits of output) [21], and no doubt in many other programs which require a quick source of random values. FireWall-1 doesn t even use rand() but instead uses a direct call to time() to generate the secret value for its S/Key authentication and regenerates it after 99 uses, making it a relatively simple task to recover the authentication secret and compromise the firewall [22]. In some cases the use of a linear congruential generator (LCRNG, which is the type usually used in programming language libraries) can interact with the cryptosystem it is used with, for example using an LCRNG or truncated LCRNG with DSA makes it possible to recover the signer s secret key after seeing only three signatures [23]. srandom( time.tv_usec ^ time.tv_sec ^ getpid() ^ \ gethostid() ^ counter++ ); key = random(); Figure 2: The Kerberos V4 generator Other generators use similarly poor sources and then further reduce what little security may be present through a variety of means such as implementation or configuration errors, for example Sun derived NFS

4 158 Requirements and Limitations of the Generator file handles (which serve as magic tokens to control access to a file and therefore need to be unpredictable) from the traditional process ID and time of day but never initialised the time of day variable (a coding error) and installed the NFS file handle initialisation program using the suninstall procedure which results in the program running with a highly predictable process ID (a configuration problem). The result of this was that a great many systems ended up using identical NFS file handles [24]. In another example of how the security of an already weak generator can be further reduced, a company which produced online gambling software used the current time to seed the Delphi (a Pascallike programming language) random() function and used the output to shuffle a deck of cards. Since a player could observe the values of some of the shuffled cards, they could predict the output of the generator and determine which cards were being held by other players [25][26]. Another generator can be persuaded to write megabytes of raw output to disk for later analysis, although the fact that it uses an X9.17 generator (described in more detail in section 3.2) makes this less serious than if a weak generator were used [27]. key = rand() % 256; key = rand(); Figure 3: The MIT_MAGIC_COOKIE (left) and Sesame (right) generators In a attempt to remedy this situation, this chapter provides a comprehensive guide to designing and implementing a practically strong random data accumulator and generator which requires no specialised hardware or access to privileged system services. The result is an easy-to-use random number generator which (currently) runs under BeOS, DOS, the Macintosh, OS/2, OS/400, Tandem NSK, VM/CMS, Windows 3.x, Windows 95/98, Windows NT/2000/XP, and Unix, and which should be suitable even for demanding applications. 2. Requirements and Limitations of the Generator There are several special requirements and limitations which affect the design of a practically strong random number generator. The main requirement (and also limitation) imposed upon the generator is that it can t rely on only one source, or on a small number of sources, for its random data. For example even if it were possible to assume that a system has some sort of sound input device, the signal obtained from it is often not random at all, but heavily influenced by crosstalk with other system components or predictable in nature (one test with a cheap 8-bit sound card in a PC produced only a single changing bit which toggled in a fairly predictable manner). An example of the problems caused by reliance on a single source is provided by a security flaw discovered in PGP 5 when used with Unix systems which contain a /dev/random driver (typically Linux and x86 BSD s). Due to the coding error shown in Figure 4, the one-byte random data buffer would be overwritten with the return code from the read() function call, which was always 1 (the number of bytes read). As a result, the random input to the PGP generator consisted of a sequence of 1 s instead of the expected /dev/random output [28]. The proposed fix for the problem itself contained a bug in that the return status of the read() was never checked, leaving the possibility that nonrandom data would be added to the pool if the read failed. A third problem with the code was that the use of single-byte reads made the generator output vulnerable to iterative-guessing attacks in which an attacker who had somehow discovered the initial pool state could interleave reads with the PGP ones and use the data they were reading to test for the most probable new seed material being added. This would allow them to track changes in pool state over time because only a small amount of new entropy was flowing into the pool between each read, and from this predict the data which PGP was reading [29]. Solutions to this type of problem are covered in the Yarrow generator design [30]. RandBuf = read(fd, &RandBuf, 1); pgprandomaddbytes(&pgprandompool, &RandBuf, 1); Read (fd, &RandBuf, 1); PgpRandomAddBytes(&pgpRandomPool, &RandBuf, 1); Figure 4: PGP 5 /dev/random read bug (left) and suggested fix (right) In addition several of the sources mentioned so far are very hardware-specific or operating-system specific. The keystroke-timing code used in older versions of PGP relies on direct access to hardware timers (under DOS) or the use of obscure ioctl s to allow uncooked access to Unix keyboard input, which may be unavailable in some environments, or function in unexpected ways. For example under Windows many features of the PC hardware are virtualised, and therefore provide much less entropy than they appear to, and under Unix the user is often not located at the system console, making keystrokes subject to the timing constraints of the telnet or rlogin session, as well as being susceptible to network

5 Random Number Generation 159 packet sniffing. Network sniffing can also reveal other details of random seed data, for example an opponent could observe the DNS queries used to resolve names when netstat is run without the -n flag, lowering its utility as a potential source of randomness. Even where direct hardware access for keystroke latency timing is possible, what s being read isn t the closure of a keyswitch on a keyboard but data which has been processed by at least two other CPU s, one in the keyboard and one on the host computer, with the result that the typing characteristics will be modified by the data paths over which it has to travel and may provide much less entropy than they appear to. Other traps abound. In the absence of a facility for timing keystrokes, mouse activity is often used as a source of randomness. However some Windows mouse drivers have a snap to capability which positions the mouse pointer over the default button in a dialog box or window. Networked applications may transmit the client s mouse events to a server, revealing information about mouse movements and clicks. Some operating systems will collapse multiple mouse events into a single meta-event to cut down on network traffic or handling overhead, reducing the input from wiggle-the-mouse randomness gathering to a single mouse move event. In addition if the process is running on an unattended server, there may be no keyboard or mouse activity at all. In order to avoid this dependency on a particular piece of hardware or operating system (or correct implementation of the data-gathering code), the generator should rely on as many inputs as possible. This is expanded on in Polling for Randomness below. The generator should also have several other properties: It should be resistant to analysis of its input data. An attacker who recovers or is aware of a portion of the input to the generator should be unable to use this information to recover the generator s state. As an extension of the above, it should also be resistant to manipulation of the input data, so that an attacker able to feed chosen input to the generator should be unable to influence its state in any predictable manner. An example of a generator which lacked this property was the one used in early versions of the BSAFE library, which could end up containing a very low amount of entropy if fed many small data blocks such as user keystroke information [31]. It should be resistant to analysis of its output data. If an attacker recovers a portion of the generator s output, they should be unable to recover any other generator state information from this. For example recovering generator output such as a session key or PKCS #1 padding for RSA keys should not allow any of the generator state to be recovered. It should take steps to protect its internal state to ensure that it can t be recovered through techniques such as scanning the system swap file for a large block of random data. This is discussed in more detail in Protecting the Randomness Pool below. The implementation of the generator should make explicit any actions such as mixing the pool or extracting data in order to allow the conformance of the code to the generator design to be easily checked. This is particularly problematic in the code used to implement the PGP 2.x random number pool, which (for example) relies on the fact that a pool index value is initially set to point past the end of the pool so that on the first attempt to read data from it the available byte count will evaluate to zero bytes, resulting in no data being copied out and the code dropping through to the pool mixing function. This type of coding makes the correct functioning of the random pool management code difficult to ascertain, leading to problems which are discussed in sections 3.3 and 3.8. All possible steps should be taken to ensure that the generator state information never leaks to the outside world. Any leakage of internal state which would allow an attacker to predict further generator output should be regarded as a catastrophic failure of the generator. An example of a generator which fails to meet this requirement is the Netscape one presented earlier, which reveals the hash of its internal state when it is used to generate the nonce used during the SSL handshake. It then increments the state value (typically changing a single bit of data) and hashes it again to produce the premaster secret from which all cryptovariables are generated. Although there are (currently) no known attacks on this, it s a rather unsound practice to reveal generator state information to the world in this manner. Since an attack capable of producing MD5 preimages would allow the premaster secret (and by extension all cryptovariables) to be recovered for the SSL handshake, the generator may also be vulnerable to a related-key attack as explained in section 3.1. This flaw is found in the code surrounding several other generators as well, with further details given in the text which covers the individual generators.

6 160 Existing Generator Designs and Problems It should attempt to estimate whether it actually contains enough entropy to produce reliable output, and alert the caller in some manner if it is incapable of guaranteeing that the output it will provide is suitably unpredictable. A number of current generators don t do this and will quite happily run on empty, producing output by hashing all-zero buffers or basic values such as the current time and process ID. It should periodically or even continuously sample its own output and perform any viable tests on it to ensure that it isn t producing bad output (at least as far as the test is able to determine) or is stuck in a cycle and repeatedly producing the same output. This type of testing is a requirement of FIPS 140 [32], although it appears geared more towards hardware rather than software implementations since most software implementations are based on hash functions which will always pass the FIPS 140 tests (apparently hardware random number generators which sample physical sources are viewed with some mistrust in certain circles, although whether this arises from INFOSEC paranoia or COMINT experience is unknown). Given the wide range of environments in which the generator would typically be employed, it is not possible within the confines of this work to present a detailed breakdown of the nature of, and capabilities of, an attacker. Because of this limitation we take all possible prudent precautions which might foil an attacker, but leave it to end users to decide whether this provides sufficient security for their particular application. In addition to these initial considerations there are number of further design considerations whose significance will become obvious during the course of the discussion of other generators and potential weaknesses. The final, full set of generator design principles is presented in the conclusion. A paper which complements this work and focuses primarily on the cryptographic transformations used by generators was published by Counterpane in 1998 [33]. 3. Existing Generator Designs and Problems A typical generator described here consists of two parts, a randomness pool and associated mixing function (the generator itself), and a polling mechanism to gather randomness from the system and add it to the pool (the randomness accumulator). These two parts represent two very distinct components of the overall generator, with the accumulator being used to continually inject random data into the generator, and the generator being used to stretch this random data via some form of PRNG as shown in Figure 5. However the PRNG functionality is only needed in some cases. Consider a typical case in which the generator is required to produce a single quantum of random data, for example to encrypt a piece of outgoing or to establish an SSL shared secret. Even if the transformation function being used in the generator is a completely reversible one such as a (hypothetical) perfect compressor, there is no loss of security because everything nonrandom and predictable is discarded and only the unpredictable material remains as the generator output. Only when large amounts of data are drawn from the system does the accumulator functionality give way to the generator functionality, at which point a transformation with certain special cryptographic qualities is required (although, in the absence of a perfect compressor, it doesn t hurt to have these present anyway). Figure 5: Generalised entropy accumulator and PRNG model

7 Random Number Generation 161 Because of the special properties required when the generator functionality is dominant, the pool and mixing function have to be carefully designed to meet the requirements given in the previous section. Before discussing the mixing function used by the generator, it might be useful to examine the types of functions which are used by other generators. The following descriptions omit some minor implementation details for simplicity, such as the fact that most generators mix in low-value data such as the time and process ID on the assumption that every little bit helps, will opportunistically use sources such as /dev/random where available (typically this is restricted to Linux and some x86 BSD s), and may store some state on disk for later reuse, a feature first popularised in PGP 2.x. In addition most of the generators have changed slightly over time, most commonly by moving from MD5 to SHA-1 or sometimes to an even more conservative function such as RIPEMD-160, the following descriptions use the most generic form of the generator in order to avoid having to devote several pages to each generator s nuances. 3.1 The Applied Cryptography Generator One of the simplest generators, shown in Figure 6, is presented in Applied Cryptography [10], and consists of a hash function such as MD5 combined with a counter value to create a pseudorandom byte stream generator running in counter mode with a 16-byte output. This generator is very similar to the one used by Netscape and the RSAREF generator [34], and there may have been cross-pollination between the designs (the Netscape generator is practically identical to the RSAREF one, so it may have been inspired by that). Figure 6: The Applied Cryptography generator This generator uses the full message digest function rather than just the compression function as most other generators do. It therefore relies on the strength of the underlying hash function for security, and would be susceptible to a related-key attack since only one or two bits of input are changed for every block of output produced. A successful attack on this generator would also compromise the Netscape generator, which uses a similar technique and which reveals the generator s previous output to an attacker. In contrast the generator used in newer version of BSAFE avoids this problem by adding a value of the same size as the generator state to ensure that a large portion of the state changes on each iteration (specifically, the update process sets state n+1 = state n + (constant n) where the constant value is a fixed bit string initialised at startup) [35]. 3.2 The ANSI X9.17 Generator The X9.17 generator [36] in its most common form is a pure PRNG, relying on the triple DES encryption operation for its strength, as shown in Figure 7. The encryption step Enc 1 ensures that the timestamp is spread over 64 bits and avoids the threat of a chosen-timestamp attack (for example setting it to all-zero or all-one bits), the Enc 2 step acts as a one-way function for the generated encryption key, and the Enc 3 step acts as a one-way function for the seed value/internal state.

8 162 Existing Generator Designs and Problems Figure 7: The ANSI X9.17 PRNG This generator has a potential problem in that it makes its internal state available to an attacker (for example if it s being used to generate a nonce which will be communicated in the clear), so that all of its security relies on the ability of the user to protect the value used to key the triple DES operation, and the hope that they ll remember to change it from the factory-default all-zero key the first time they use the device it s contained in. This is a risky assumption to make. The Capstone and cryptlib generators (covered in sections 3.10and 4) insert an extra mixing step at the output to ensure that internal state will never be visible to an attacker. 3.3 The PGP 2.x Generator PGP 2.x uses a slightly different method which involves encrypting the contents of an entropy pool with the MD5 compression function used as a CFB-mode stream cipher in a so-called message digest cipher configuration [37]. The key consists of the previous state of the pool, with the data from the start of the pool being used as the 64-byte input to the compression function. The pool itself is 384 bytes long, although other programs such as CryptDisk and Curve Encrypt for the Macintosh, which also use the PGP random pool management code, extend this to 512 bytes. The data being encrypted is the 16-byte initialisation vector (IV) which is XORd with the data at the current pool position (in fact there is no need to use CFB mode, the generator could just as easily use CBC as there is no need for the encryption to be reversible). This process carries 128 bits of state (the IV) from one block to another. The initial IV is taken from the end of the pool, and mixing proceeds until the entire pool has been processed as shown in Figure 8. Once the pool contents have been mixed, the first 64 bytes are extracted to form the key for the next round of mixing, and the remainder of the pool is available for use by PGP. Figure 8: The PGP 2.x generator This generator exhibits something which will be termed the startup problem, in which processed data at the start of the pool (in other words the generator output) depends only on the initial data mixed in. This means that data generated from or at the start of the pool is based on less entropy than data arising from further back in the pool, which will be affected by chaining of data from the start of the pool. This problem also affects a number of other generators, particularly ones such as the SSLeay/OpenSSL one

9 Random Number Generation 163 which mix their data in very small, discrete blocks rather than trying to apply as much pool state as possible to each mixed data quantum. Because of this problem, newer versions of PGP and PGP-inspired software perform a second pass over the pool for extra security and to ensure that data from the end of the pool has a chance to affect the start of the pool. The pool management code allows random data to be read directly out of the pool with no postprocessing, and relies for its security on the fact that the previous pool contents, which are being used as the key for the MD5 cipher, cannot be recovered. This problem is further exacerbated by the generator s startup problem. Direct access to the pool in this manner is rather dangerous since the slightest coding error could lead to a catastrophic failure in which the pool data is leaked to outsiders (later versions of the code were changed to fix this problem). A problem with the implementation itself, which has been mentioned previously, is that the correct functioning of the PGP 2.x random number management code is not immediately obvious, making it difficult to spot problems of this nature (at one point the generator was redesigned and the code simplified because the developers could no longer understand the code they had been working with). This has lead to problems with the code such as the notorious xorbytes bug [38] in which a two-line function isolated from the rest of the code accidentally used a straight assignment operator in place of an xor-and-assign operator as shown in Figure 9. As a result, new data which was added overwrote existing data rather than being mixed into it through the XOR operation, resulting in no real increase in entropy over time, and possibly even a decrease if low-entropy data was added after high-entropy data had been added. while (len--) *dest++ = *src++; while (len--) *dest++ ^= *src++; Figure 9: The xorbytes bug (left) and corrected version (right) PGP also preserves some randomness state between invocations of the program by storing a nonce on disk which is en/decrypted with a user-supplied key and injected into the randomness pool. This is a variation of method used by the ANSI X9.17 generator which utilises a user-supplied key and a timestamp (as opposed to PGP s preserved state). 3.4 The PGP 5.x Generator PGP 5.x uses a slightly different update/mixing function which adds an extra layer of complexity to the basic PGP 2.x system. This retains the basic model used in PGP 2.x (with a key external to the pool being used to mix the pool itself), but changes the hash function from MD5 to SHA-1, the encryption mode from CFB to CBC, and adds feedback between the pool and the SHA-1 key data. The major innovation in this generator is that the added data is mixed in at a much earlier stage than in the PGP 2.x generator, being added directly to the key (where it immediately affects any further SHA-1-based mixing) rather than to the pool. The feedback of data from the pool to the key ensures that any sensitive material (such as a user passphrase) which is added isn t left lying in the key buffer in plaintext form. In the generator pseudocode shown in Figure 10 the arrays are assumed to be arrays of bytes. Where a 32 suffix is added to the name, it indicates that the array is treated as an array of 32-bit words with index values appropriately scaled. In addition the index values wrap back to the start of the arrays when they reach the end. Because of the complexity of the update process, it s not possible to represent it diagrammatically as with the other generators so Figure 10 illustrates it as pseudocode. pool[ 640 ], poolpos = 0; key[ 64 ], keypos = 0; addbyte( byte ) { /* Update the key */ key[ keypos++ ] ^= byte; if( another 32-bit word accumulated ) key32[ keypos ] ^= pool32[ poolpos ]; /* Update the pool */ if( about 16 bits added to key ) {

10 164 Existing Generator Designs and Problems } /* Encrypt and perform IV-style block chaining */ hash( pool[ poolpos ], key ); pool[ next 16 bytes ] ^= pool[ current 16 bytes ]; } Figure 10: The PGP 5.x Generator Once enough new data has been added to the key, the resulting key is used to encrypt the pool using SHA-1, ensuring that the pool data which was fed back to mask the newly-added keying material is destroyed (the code actually uses a digital differential analyser (DDA) to determine when enough new data has been added to make a pool mixing operation necessary, in the same way that the original DDA was used to determine when to perform an X or Y pixel increment when drawing a line on a graphics device). In this way the entire pool is encrypted with a key which changes slightly for each block rather than a constant key, and the encryption takes place incrementally instead of the using the monolithic update technique preferred by other generators. A second feature added by PGP 5.x is that the pool contents are not fed directly to the output but are first folded in half (a 20-byte SHA-1 output block has the high and low halves XORd together to produce a 10-byte result) and is then postprocessed by an X9.17 generator (using Cast-128, PGP 5.x s default cipher, instead of triple DES), thus ensuring that an attacker can never obtain information about the internal generator state if they can recover its output data. Since the X9.17 generator provides a 1:1 mapping of input to output, it can never reduce the entropy of its input, and it provides an extra level of security by acting as a one-way filter on the output of the previous generator section. In addition a separate X9.17 generator is used to generate non-cryptographically-strong random data for operations such as generating the public values used in discrete-log public keys, again helping ensure that state information from the real generator isn t leaked to an attacker. In terms of good conservative designs, this generator is probably at the same level as the Capstone generator. 3.5 The /dev/random Generator Another generator inspired by the PGP 2.x one is the Unix /dev/random driver [39], of which a variant also exists for DOS. The driver was inspired by PGPfone (which seeded its generator from sampled audio data) and works by accumulating information such as keyboard and mouse timings and data, and hardware interrupt and block device timing information, which is supplied to it either by the Unix kernel or by hooking DOS interrupts. Since the sampling occurs during interrupt processing, it is essential that the mixing of the sample data into the pool be as efficient as possible (this was even more critical when it was used in PGPfone). For this reason the driver uses a CRC-like mixing function in place of the traditional hash function to mix the data into the pool, with hashing only being done when data is extracted from the pool, as shown in Figure 11. Because the driver is in the kernel and is fed directly by data from system events, there s little chance of an attacker being able to feed it chosen input so there s far less need for a strong input mixing function than there is for other generators which have to be able to process user-supplied input.

11 Random Number Generation 165 Figure 11: The /dev/random generator On extracting data the driver hashes successive 64-byte blocks of the pool using the compression function of MD5 or SHA-1, mixes the resulting 16 or 20-byte hash back into the pool in the same way that standard input data is mixed in, hashes the first 64 bytes of pool one more time to obscure the data which was fed back to the pool, and returns the final 16 or 20-byte hash to the caller. If more data is required, this process is iterated until the pool read request is satisfied. The driver makes two devices available, /dev/random which estimates the amount of entropy in the pool and only returns that many bits, and /dev/urandom which uses the PRNG described above to return as many bytes as the caller requests. 3.6 The Skip Generator The Skip generator shares with the PGP generators a complex and convoluted update mechanism whose code takes some analysis to unravel. The generator performs two different functions, one which reads the output of iostat, last, netstat, pstat, or vmstat (the target system is one running SunOS 4.x), and mixes it into a randomness pool, and the other which acts as a PRNG based on the pool contents. The use of such a small number of sources seems rather inadequate, for example last (which comes first in the code) produces output which is both relatively predictable and can be recovered days, months, or even years after the poll has run by examining the wtmp file which is used as the input to last. In the worst case if none of the polls succeed, the code will drop through and continue without mixing in any data, since no check on the amount of polled entropy is performed.

12 166 Existing Generator Designs and Problems Figure 12: The Skip generator The mixing operation for polled data hashes the polled data and the randomness pool with SHA-1 and copies the resulting 20-byte hash back to the byte randomness pool, cyclically overwriting one of the existing blocks. This operation is the initial one shown in Figure 12. The mixing operation continues by taking a copy of the previous hash state before the hashing was wrapped up and continuing the hashing over the 20-byte hash value, in effect generating a hash of the data shown in the lower half of Figure 12. The resulting 20-byte hash is the output value, if more output is required the process is repeated over the randomness pool only (that is, the polling step is only performed once, adding at most 160 bits of entropy per poll). Although the reduction of all polled data to a 160-bit hash isn t a major weakness (there s probably much less than 160 bits of entropy available from the polled sources), it would be desirable to take advantage of the full range of input entropy rather than restricting it to a maximum of 160 bits. In addition only 20 bytes of the pool change each time the PRNG is stepped, again this isn t a major weakness but it would be desirable to perturb the entire pool rather than just one small portion of it. 3.7 The ssh Generator Like the Skip generator, the ssh generator is also polling-based, but it mixes the output from ps, ls, w, and netstat [40]. These sources are even less unpredictable than the ones used by Skip, and the integrity of the polling process is threatened by a 30-second timeout on polling of all sources, a feature which was intended as a safety measure to prevent a slow-running source from halting ssh. This means that if a source blocks for any amount of time (in particular if an attacker can cause ps, the first source, to block for at least 30 seconds) the code will continue without collecting any entropy. The PRNG is identical to the one used in newer versions of PGP 2.x, performing two passes of the MD5- based message digest cipher over a 1KB pool and, also like PGP, copying the internal pool contents directly to the output (although the first 64 bytes of pool data, which acts as the MDC key, is never copied out and the two rounds of mixing avoid PGP 2.x s startup problem to some extent). In addition, the code makes no attempt to track the amount of entropy in the pool, so that it s possible that it could be running with minimal or even no entropy. As with the Netscape generator, output from the ssh generator (in this case 64 bits of its internal state) is sent out over the network when the server sends its anti-spoofing cookie as part of the SSH_SMSG_PUBLIC_KEY packet sent at the start of the ssh handshake process. It is thus possible to obtain arbitrary amounts of generator internal state information simply by repeatedly connecting to an ssh server. Less seriously, raw generator output is also used to pad messages, although recovering this would require compromising the encryption used to protect the session.

13 Random Number Generation The SSLeay/OpenSSL Generator The SSLeay/OpenSSL generator uses two completely separate functions, one for mixing in entropy and the other for the PRNG. Unlike most of the other generators, it performs no real polling of entropy sources but relies almost entirely on data supplied by the user, a dangerous assumption whose problems are examined in section 5.1. The first portion of the generator is the entropy mixing function shown in Figure 13, which hashes a 20- byte hash value (initially set to all zeros) and successive 20-byte blocks of a 1KB randomness pool and user supplied data to produce 20 bytes of output, which both become the next 20-byte hash value and are XORd back into the pool. Although each block of pool data is only affected by an equivalent-sized block of input data, the use of the hash state value means that some state information is carried across from previous blocks, although it would probably be preferable to hash more than a single 20-byte block to ensure that as much of the input as possible affects each output block. In particular, the generator suffers from an extreme case of the startup problem since the initial pool blocks are only affected by the initial input data blocks. In the case when the generator is first initialised and the pool contains all zero bytes the first 20 bytes of output is simply an SHA-1 hash of the first 20 bytes of user-supplied data. 20 Hash Randomness pool Input data SHA-1 Hash' XOR Randomness pool Successive hashes Input data Successive hashes Figure 13: The SSLeay/OpenSSL generator s mixing function The second portion of the generator is the PRNG function shown in Figure 14, which both mixes the pool and produces the generator s output. This works by hashing the second 10 bytes of the hash state value (the first 8 bytes remain constant and aren t used) and successive 1 10-byte blocks of the pool (the amount hashed depends on the number of output bytes requested). The first 10 bytes of the hash result are XORd back into the pool, and the remaining 10 bytes are provided as the generator s output and also reused as the new hash state. Again, apart from the 10-byte chaining value, all data blocks are completely independent.

14 168 Existing Generator Designs and Problems Randomness pool SHA-1 XOR Randomness pool Output Figure 14: The SSLeay/OpenSSL generator's PRNG function As used in SSLeay/OpenSSL, this generator shares with the ssh generator the flaw that it s possible for an attacker to suck infinite amounts of state information out of it by repeatedly connecting to the server, since it s used to create the 28-byte nonce (the SSL cookie/session ID) which is sent in the server hello. In addition to this problem, the output also reveals the hash state (but not the pool state). The use on the client side is even more unsound, since it s used to first generate the client cookie which is sent in the client hello and then immediately afterwards to generate the premaster secret from which all other cryptovariables are derived. What makes this practice even more dangerous is that, unlike the server which has probably been running for some time so that the pool has been mixed repeatedly, clients are typically shut down and restarted as required. Combined with the generator s startup problem and (in older versions) the lack of entropy checking and possible lack of seeding described in section 5.1, the first client hello sent by the client will reveal the generator seed data (or lack thereof) and hash state, and the premaster secret follows from this information. This problem of revealing generator state information also occurs in the Netscape code, the SSLRef code which served as a reference implementation for SSL 3.0 (the cookie/session ID random data is actually initialised twice, the second initialisation overwriting the first one), and no doubt in any a number of other SSL implementations. Part of the blame for this problem lies in the fact that both the original SSL specification [41] and later the TLS specification [42] specify that the cookies should be generated by a secure random number generator even though there s no need for this, and it can in fact be dangerously misleading. Another problem, shared with the PGP generator, is the almost incomprehensible nature of the code which implements it, making it very difficult to analyse. For example the generator contained a design flaw which resulted in it only feeding a small amount of random pool data (one to ten bytes) into the PRNG function, but this wasn t discovered and corrected until July 2001 [43]. This problem, combined with the fact that the PRNG hash state is made available as the generator output as described above, would allow an attacker to recover the random pool contents by making repeated 1-byte requests to the generator, which would respond with a hash of the (known) state and successive bytes of the pool. 3.9 The CryptoAPI Generator Like the SSLeay/OpenSSL generator, the CryptoAPI generator uses separate functions for mixing in entropy and for the PRNG. The entropy-mixing stage hashes polled data using SHA-1, and the PRNG stage uses the SHA-1 output to key an RC4 stream cipher, as shown in Figure 15. The polled data consists of the traditional time and process ID and a few relatively poor additional sources such as the system s current memory and disk usage, the static data consists of the previous hash output recycled for

15 Random Number Generation 169 further use [44]. Unlike PGP, the CryptoAPI preserved state doesn t appear to be protected by a user password. Polled data Static data SHA-1 hash RC4 Figure 15: The CryptoAPI generator This generator is, at best, adequate. The static data isn t password-protected like the PGP seed and the polled data doesn t provide much entropy, particularly if the generator is seeded at system startup, which is typically the case as Windows system components make use of CryptoAPI during the boot phase. In addition no steps appear to be taken to mitigate problems such as the fact the RC4 exhibits correlations between its key and the initial bytes of its output [45][46][47] as well as having statistical weaknesses [48][49][50], resulting in the generator leaking part of its internal state in the first few bytes of PRNG output or producing some predictable output during its operation The Capstone/Fortezza Generator The generator used with the Capstone chip (which presumably is the same as the one used in the Fortezza card) is shown in Figure 16. This is a nice conservative design which utilises a variety of sources and mechanisms so that even if one mechanism fails an adequate safety margin will be provided by the remaining mechanisms. The main feature of this generator is the incorporation of an X9.17-like generator which utilises Skipjack in place of triple DES and which is fed from some form of (currently unknown) physical randomness source in place of X9.17 s time value [51]. Since the randomness source provides a full 64 bits of entropy, there s no need for the input encryption operation which is required in the X9.17 generator to spread the time value over the entire 64 bits of data (the 224 bits of output correspond to 3½ Skipjack blocks). Figure 16: The Capstone/Fortezza generator In addition to the X9.17-like generator, this generator takes 240 bits of entropy directly from the physical

16 170 Existing Generator Designs and Problems source and also mixes in the output of a 48-bit counter which guarantees that some input to the following hashing step will still change even if the physical source somehow gets stuck at a single output value. Finally, the entire collection of inputs is fed through SHA-1 to mix the bits and ensure that an attacker can never see any internal state information. Alternatively, if an attacker could (somehow) compromise the SHA-1 step, they would still have to find a means of attacking the X9.17 generator which feeds it. As has been mentioned above, this is a good, conservative design which uses redundant sources to protect against the failure of any single input source, uses multiple dissimilar sources so that an attack which is effective against one particular source has less change of compromising the others, and protects its internal state against observation by attackers 1 (a design which is very similar to the one used in the Capstone generator is employed in a generator presented in the open literature which dates from roughly the same time period [12]). Because further details of its usage aren t available, it s not known whether the generator as used in the Fortezza card is used in a safe manner or not, for example the card provides the function CI_GenerateRandom() which appears to provide direct access to the SHA-1 output and would therefore allow an attacker to obtain arbitrary amounts of generator output for analysis The Intel Generator The generator which is available with some chipsets used with the Intel Pentium III CPU samples thermal noise in resistors and, after some internal processing, feeds it into the PRNG shown in Figure 17. Each time the PRNG is stepped, another 32 bits of sampled noise are injected into the PRNG state, ensuring that further entropy is continuously added to the generator as it runs. Details of the physical noise source are given elsewhere [52][53]. This generator shares with the Capstone/Fortezza generator the use of a physical source and SHA-1-based postprocessor, however it makes the SHA-1 step part of the PRNG rather than using a separate PRNG and using SHA-1 purely as a postprocessing function. Figure 17: The Intel Pentium III generator The use of a single source to feed the PRNG makes this generator slightly less conservative than the Capstone/Fortezza one, since a failure of the physical source at some point after it has passed the FIPS 140 tests applied at power-up would result in the generator eternally recycling its internal state (or at least a truncated portion thereof). This might occur if the generator functions correctly when cold (immediately after power-up, when the FIPS 140 tests are applied) but fails in some way once the system warms up. The existing Pentium III unique serial number capability could be extended to provide a backup source of input to the PRNG by storing with each processor a unique value (which, unlike the processor ID, can t be read externally) which is used to drive some form of generator equivalent to the X9.17-like generator used in the Capstone/Fortezza generator, supplementing the existing physical randomness source. In the simplest case one or more linear feedback shift registers (LFSR s) driven from the secret value would 1 As with literature analysis, it s possible that some of the meaning being read into this would surprise the original authors of the work. Unfortunately the rationale for the Capstone/Fortezza generator design has never been made public.

17 Random Number Generation 171 serve to supplement the physical source while consuming an absolute minimum of die real estate. Although the use of SHA-1 in the output protects the relatively insecure LFSR s, an extra safety margin could be provided through the addition of a small amount of extra circuitry to implement an enhanced LFSR-based generator such as a stop-and-go generator which, like the basic LFSR generator, can be implemented with a fairly minimal transistor count. In addition, like some other generators, the PRNG reveals a portion of its internal state every time it is applied. Since a portion of the PRNG state is already being discarded each time it is stepped, it would have been better to avoid recycling the output data into the state data. Currently, two 32-bit blocks of previous output data are present in each set of PRNG state data. 4. The cryptlib Generator Now that we ve examined several generator designs and the various problems they can run into, we can look at the cryptlib generator. This section mostly covers the random pool management and PRNG functionality, the entropy polling process is covered in the next section. 4.1 The Mixing Function The function used in this generator improves on the generally-used style of mixing function by incorporating far more state than the 128 or 160 bits used by other code. The mixing function is again based on a one-way hash function (in which role MD5 or SHA-1 are normally employed) and works by treating a block of memory (typically a few hundred bytes) as a circular buffer and using the hash function to process the data in the buffer. Instead of using the full hash function to perform the mixing, we only utilise the central byte or byte transformation which constitutes the hash function s compression function and which is somewhat faster than using the full hash. Assuming the use of SHA-1, which has a 64-byte input and 20-byte output, we would hash the bytes at locations n 20 n + 63 and then write the resulting 20-byte hash to locations n n + 19 (the chaining which is performed explicitly by mixing functions like the PGP/ssh and SSLeay/OpenSSL ones is performed implicitly here by including the previously processed 20 bytes in the input to the hash function as shown in Figure 18). We then move forward 20 bytes and repeat the process, wrapping the input around to the start of the buffer when the end of the buffer is reached. The overlapping of the data input to each hash means that each 20-byte block which is processed is influenced by all the surrounding bytes. Figure 18: The cryptlib generator This process carries 672 bits of state information with it, and means that every byte in the buffer is directly influenced by the 64 bytes surrounding it and indirectly influenced by every other byte in the buffer (although it can take several iterations of mixing before this indirect influence is felt, depending on the size of the buffer). This is preferable to alternative schemes which involve encrypting the data with a block cipher using block chaining, since most block ciphers carry only 64 bits of state along with them. The pool management code keeps track of the current write position in the pool. When a new data byte arrives, it is added to the byte at the current write position in the pool, the write position is advanced by one, and, when the end of the pool is reached, the entire pool is remixed using the mixing function described above. Since the amount of data which is gathered by the randomness-polling described in the

18 172 The cryptlib Generator next section is quite considerable, we don t need to perform the input masking which is used in the PGP 5.x generator because a single randomness poll will result in many iterations of pool mixing as all the polled data is added. 4.2 Protection of Pool Output Data removed from the pool is not read out in the byte-by-byte manner in which it is added. Instead, an entire key is extracted in a single block, which leads to a security problem: If an attacker can recover one of the keys, comprising m bytes of an n-byte pool, the amount of entropy left in the pool is only n m bytes, which violates the design requirement that an attacker be unable to recover any of the generator s state by observing its output. This is particularly problematic in cases such as some discrete-log based PKCs in which the pool provides data for first public and then private key values, because an attacker will have access to the output used to generate the public parameters and can then use this output to try to derive the private value(s). One solution to this problem is to use a generator such as the X9.17 generator to protect the contents of the pool as done by PGP 5.x. In this way the key is derived from the pool contents via a one-way function. The solution we use is a slight variation on this theme. What we do is mix the original pool to create the new pool and invert every bit in a copy of the original pool and mix that to create the output data. It may be desirable to tune the operation used to transform the pool to match the hash function depending on the particular function being used, for example SHA performs a complex XOR-based key schedule on the input data which could potentially lead to problems if the transformation consists of XOR-ing each input word with 0xFFFFFFFF. In this case it might be preferable to use some other form of operation such as a rotate and XOR, or the CRC-type function used by the /dev/random driver. If the pool were being used as the key for a DES-based mixing function, it would be necessary to adjust for weak keys; other mixing methods might require the use of similar precautions. This method should be secure provided that the hash function we use meets its design goal of preimage resistance and is a random function (that is, no polynomial-time algorithm exists to distinguish the output of the function from random strings). The resulting generator is very similar to the triple-des based ANSI X9.17 generator, but replaces the keyed triple-des operations with an un-keyed one-way hash function, producing the same effect as the X9.17 generator, as shown in Figure 19 (compare this with Figure 7). Seed H 1 Pool H 2 Output H' 3 Figure 19: cryptlib generator equivalence to the X9.17 PRNG In this generator, H 1 mixes the input and prevents chosen-input attacks, H 2 acts as a one-way function for the output to ensure that an attacker never has access to the raw pool contents, and H' 3 acts as a one-way function for the internal state. This generator is therefore functionally similar to the X9.17 one, but contains significantly more internal state and doesn t require the use of a rather slow triple DES implementation and the secure storage of an encryption key. 4.3 Output Post-processing The PRNG output isn t sent directly to the caller but is first passed through an X9.17 generator which is

19 Random Number Generation 173 re-keyed every time a certain number of output blocks have been produced with it, with the currentlyactive key being destroyed. Since the X9.17 generator produces a 1:1 mapping, it can never make the output any worse, and it provides an extra level of protection for the generator output (as well as making it easier to obtain FIPS 140 certification). Using the generator in this manner is valid since X9.17 requires the use of DT, a date/time vector which is updated on each key generation, and cryptlib chooses to represent this value as a hash of assorted incidental data and the date and time. The fact that % of the value of the X9.17 generator is coming from the timestamp is as coincidental as the side effect of the engine cooling fan in the Brabham ground effect cars [54]. As an additional precaution to protect the X9.17 generator output, we use the technique which is also used in PGP 5.x of folding the output in half so that we don t reveal even the triple-des encrypted oneway hash of a no-longer-existing version of the pool contents to an attacker. 4.4 Other Precautions To avoid the startup problem, the generator won t produce any output unless the entire pool has been mixed at least 10 times, although the large amount of state data applied to each mixed block during the mixing process and the fact that the polling process contributes tens of kilobytes of data resulting in many mixing operations being run ameliorates the startup problem to some extent anyway. If the generator is asked to produce output and less than 10 mixing operations have been performed, it mixes the pool (while adding further entropy at each iteration) until the minimum mix count has been reached. As with a Feistel cipher, each round of mixing adds to the diffusion of bits across the entire pool. 4.5 Nonce Generation Alongside the CSPRNG, cryptlib also provides a mechanism for generating nonces when random but not necessarily unpredictable data is required. This mechanism is used to generate initialisation vectors (IV s), nonces and cookies used in protocols such as ssh and SSL/TLS, random padding data, and data for other at-risk situations in which secure random data isn t required and shouldn t be used. The implementation is fairly straightforward and is illustrated in Figure 20. The first time the nonce generator is called the state buffer is seeded with the current time. Each time the PRNG is stepped, the buffer is hashed and the result copied back to the buffer and also produced as output. The use of this generator where such use is appropriate guarantees that an application is never put in a situation where it acts as an oracle for an opponent attacking the real PRNG, since all it reveals is an n th -generation hash of the time. A similar precaution is used in PGP 5.x. static BYTE noncedata[ 20 ]; static BOOLEAN noncedatainitialised = FALSE; if(!noncedatainitialised ) { noncedata = time(); noncedatainitialised = TRUE; } /* Shuffle the pool and copy it to the output buffer until it's full */ while( more data required ) { hash noncedata; copy noncedata to output; } 4.6 Generator Continuous Tests Figure 20: cryptlib nonce generator Another safety feature which, although it s more of a necessity for a hardware-based RNG, is also a useful precaution when used with a software-based RNG, is to continuously run the generator output through whatever statistical tests are feasible under the circumstances to at least try to detect a catastrophic failure of the generator. To this end, NIST has designed a series of statistical tests which are tuned for catching certain types of errors which can crop up in random number generators, ranging from the relatively simple frequency and runs tests to detect the presence of too many zeroes or ones and too small or too large a number of runs of bits, through to more obscure problems such as spectral tests to

20 174 The cryptlib Generator determine the presence of periodic features in the bit stream and random excursion tests to detect deviations from the distribution of the number of random walk visits to a certain state [55]. Heavy-duty tests of this nature and the ones mentioned in the Randomness Polling Results section of this chapter, and even the FIPS 140 tests, assume the availability of a huge (relative to, say, a 128-bit key) amount of generator output and consume a considerable amount of CPU time, making them impractical in this situation. However, by changing the way the tests are applied slightly, we can still use them as a failsafe test on the generator output without either requiring a large amount of output or consuming a large amount of CPU time. The main problem with performing a test on a small quantity of data is that we re likely to encounter an artificially high rejection rate for otherwise valid data due to the small size of the sample. However, since we can draw arbitrary quantities of output from the generator, all we have to do is repeat the tests until the output passes. If the output repeatedly fails the testing process, we report a failure in the generator and halt. The testing consists of a cut-down version of the FIPS 140 statistical tests, as well as a modified form of the FIPS 140 continuous test which compares the first 32 bits of output against the first 32 bits of output from the last few samples taken, which detects stuck-at faults and short cycles in the generator. Given that most of the generators in use today use MD5 or SHA-1 in their PRNG, applying FIPS 140 and similar tests to their output falls squarely into the warm fuzzy (some might say wishful thinking) category, but it will catch catastrophic failure cases which would otherwise go undetected (the author is aware of one security product where the fact that the PRNG wasn t RNG ing was only detected by the fact that a DES key load later failed because the key parity bits for an all-zero key weren t being adjusted correctly). 4.7 Generator Verification Cryptovariables such as keys lie at the heart of any cryptographic system and must be generated by a random number generator of guaranteed quality and security. If the generation process is insecure then even the most sophisticated protection mechanisms in the architecture won t do any good. More precisely, the cryptovariable generation process must be subject to the same high level of assurance as the kernel itself if the architecture is to meet its overall design goal. Because of this requirement, the cryptlib generator is build using the same design and verification principles that are applied to the kernel as described in the previous chapter. Every line of code in which is involved in cryptovariable generation is subject to the verification process used for the kernel, to the extent that there is more verification code present in the generator than implementation code. The work carried out by the generator is slightly more complex than the kernel s application of filter rules, so that in addition to verifying the flow-of-control processing as is done in the kernel, the generator code also needs to be checked to ensure that it processes the data flowing through it correctly. Consider for example the pool processing mechanism described in 4.2, which inverts every bit in the pool and remixes it to create the intermediate output (which is then fed to the X9.17 post-processor before being folded in half and passed on to the user), while remixing the original pool contents to create the new pool. There are several steps involved here, each of which need to be verified. First, after the bit-flipping we need to check that the new pool isn t the same as the old pool (which would indicate that the bit-flipping process had failed) and that the difference between the old and new pools is that the bits in the new pool are flipped (which indicates that the transformation being applied is a bit-flip and not some other type of operation). Once this check has been performed, the old and new pools are mixed. This is a separate function which is itself subject to the verification process, but which won t be described here for space reasons. After the mixing has been completed, the old and new pools are again compared to ensure that they differ, and that the difference is more than just the fact that one consists of a bit-flipped version of the other (which would indicate that the mixing process had failed). The verification checks for just this portion of code are shown in Figure 21. This operation is then followed by the others described earlier, namely continuous sampling of generator output to detect stuck-at faults, post-processing using the X9.17 generator, and folding of the output fed to the user to mask the generator output. These steps are subject to the usual verification process. /* Make the output pool the inverse of the original pool */ for( i = 0; i < RANDOMPOOL_SIZE; i++ ) outputpool[ i ] = randompool[ i ] ^ 0xFF;

The following paper was originally published in the Proceedings of the 7th USENIX Security Symposium San Antonio, Texas, January 26-29, 1998 Software Generation of Practically Strong Random Numbers Peter

Network Security Chapter 6 Random Number Generation 1 Tasks of Key Management (1)! Generation:! It is crucial to security, that keys are generated with a truly random or at least a pseudo-random generation

Modes of Operation Steven M. Bellovin February 3, 2009 1 Using Cryptography As we ve already seen, using cryptography properly is not easy Many pitfalls! Errors in use can lead to very easy attacks You

The Misuse of RC4 in Microsoft Word and Excel Hongjun Wu Institute for Infocomm Research, Singapore hongjun@i2r.a-star.edu.sg Abstract. In this report, we point out a serious security flaw in Microsoft

Header (AH) AH Layout Other AH Fields Mutable Parts of the IP Header What is an SPI? What s an SA? Encapsulating Security Payload (ESP) ESP Layout Padding Using ESP IPsec and Firewalls IPsec and the DNS

SNARE Agent for Windows v 4.2.3 - Release Notes Snare is a program that facilitates the central collection and processing of the Windows Event Log information. All three primary event logs (Application,

Chapter 17 Transport-Level Security Web Security Considerations The World Wide Web is fundamentally a client/server application running over the Internet and TCP/IP intranets The following characteristics

Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 11 Cryptographic Hash Functions Each of the messages, like each

RFG Secure FTP Web Interface Step 1: Getting to the Secure FTP Web Interface: Open your preferred web browser and type the following address: http://ftp.raddon.com After you hit enter, you will be taken

Message Authentication message authentication is concerned with: protecting the integrity of a message validating identity of originator non-repudiation of origin (dispute resolution) will consider the

CHAPTER 1 Note The information in this chapter applies to both the ACE module and the ACE appliance unless otherwise noted. The features in this chapter apply to IPv4 and IPv6 unless otherwise noted. Secure

Lecture topics Cryptography basics Using SSL to secure communication links in J2EE programs Programmatic use of cryptography in Java Cryptography basics Encryption Transformation of data into a form that

system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users. From a high-level standpoint, attacks on computer systems and networks can be grouped

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography What Is Steganography? Steganography Process of hiding the existence of the data within another file Example:

Practical Random Number Generation in Software John Viega Virginia Tech viega@list.org Abstract There is a large gap between the theory and practice for random number generation. For example, on most operating

Three attacks in SSL protocol and their solutions Hong lei Zhang Department of Computer Science The University of Auckland zhon003@ec.auckland.ac.nz Abstract Secure Socket Layer (SSL) and Transport Layer

HOW ENCRYPTION WORKS Technology Overview Strong Encryption BackupEDGE Introduction to BackupEDGE Data Encryption A major feature of BackupEDGE is the ability to protect archives containing critical client

Lab Exercise SSL/TLS Objective To observe SSL/TLS (Secure Sockets Layer / Transport Layer Security) in action. SSL/TLS is used to secure TCP connections, and it is widely used as part of the secure web:

SSL/TLS provides endpoint authentication and communications privacy over the Internet using cryptography. For web browsing, email, faxing, other data transmission. In typical use, only the server is authenticated

Security vulnerabilities in the Internet and possible solutions 1. Introduction The foundation of today's Internet is the TCP/IP protocol suite. Since the time when these specifications were finished in

Secure Socket Layer 1 Security Threat Classifications One way to classify Web security threats in terms of the type of the threat: Passive threats Active threats Another way to classify Web security threats

PART-A Questions 1. Name the aspects to be considered of information security. 2. What is meant by deciphering? 3. What are the two different uses of public key cryptography related to key distribution?

Elements of Security Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: April 15, 2015 Slideset 8: 1 Some Poetry Mary had a little key (It s all she could export)

Developing and Investigation of a New Technique Combining Message Authentication and Encryption Eyas El-Qawasmeh and Saleem Masadeh Computer Science Dept. Jordan University for Science and Technology P.O.

I should be able to whisper something in your ear, even if your ear is 1000 miles away, and the government disagrees with that. -- Philip Zimmermann PGP - Pretty Good Privacy - services - message format

GCM-SIV: Full Nonce Misuse-Resistant Authenticated Encryption at Under One Cycle per Byte Shay Gueron Haifa Univ. and Intel Yehuda Lindell Bar-Ilan University Appeared at ACM CCS 2015 How to Encrypt with

EXAM questions for the course TTM4135 - Information Security May 2013 Part 1 This part consists of 5 questions all from one common topic. The number of maximal points for every correctly answered question

Key Management (Distribution and Certification) (1) Remaining problem of the public key approach: How to ensure that the public key received is really the one of the sender? Illustration of the problem

Installation and usage of SSL certificates: Your guide to getting it right So, you ve bought your SSL Certificate(s). Buying your certificate is only the first of many steps involved in securing your website.

Whitepaper : Using Unsniff Network Analyzer to analyze SSL / TLS A number of applications today use SSL and TLS as a security layer. Unsniff allows authorized users to analyze these applications by decrypting

Purpose: The Department of Information Technology (DoIT) is committed to developing secure applications. DoIT s System Development Methodology (SDM) and Application Development requirements ensure that

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security Presented 2009-05-29 by David Strauss Thinking Securely Security is a process, not