mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Clarify comments on use of AES OFB block mode
This commit is contained in:
		
							parent
							
								
									00131446be
								
							
						
					
					
						commit
						968646c079
					
				@ -309,13 +309,22 @@ int mbedtls_aes_crypt_cfb8( mbedtls_aes_context *ctx,
 | 
				
			|||||||
 *        The OFB operation is identical for encryption or decryption, therefore
 | 
					 *        The OFB operation is identical for encryption or decryption, therefore
 | 
				
			||||||
 *        no operation mode needs to be specified.
 | 
					 *        no operation mode needs to be specified.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * \note  Upon exit, the content of the IV is updated so that you can
 | 
					 * \note  Upon exit, the content of iv, the Initialisation Vector, is updated
 | 
				
			||||||
 *        call the same function again on the next
 | 
					 *        so that you can call the same function again on the next block(s) of
 | 
				
			||||||
 *        block(s) of data and get the same result as if it was
 | 
					 *        data and get the same result as if it was encrypted in one call. This
 | 
				
			||||||
 *        encrypted in one call. This allows a "streaming" usage.
 | 
					 *        allows a "streaming" usage, by initialising iv_off to 0 before the
 | 
				
			||||||
 *        If you need to retain the contents of the
 | 
					 *        first call, and preserving its value between calls.
 | 
				
			||||||
 *        IV, you must either save it manually or use the cipher
 | 
					 *
 | 
				
			||||||
 *        module instead.
 | 
					 *        For block by block usage, (or non-streaming use), the iv should be
 | 
				
			||||||
 | 
					 *        initialised on each call to a unique value, and iv_off set to 0 on
 | 
				
			||||||
 | 
					 *        each call.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *        If you need to retain the contents of the initialisation vector, you
 | 
				
			||||||
 | 
					 *        must either save it manually or use the cipher module instead.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *        For the OFB mode, the initiallisation vector must be unique and must
 | 
				
			||||||
 | 
					 *        be unique for every encryption operation. Reuse of an initialisation
 | 
				
			||||||
 | 
					 *        vector will compromise security.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * \param ctx      The AES context to use for encryption or decryption.
 | 
					 * \param ctx      The AES context to use for encryption or decryption.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user