Skip to content

Commit 188c1aa

Browse files
committed
Update javadoc to mention that fixed IV is deprecated.
1 parent 0ab470c commit 188c1aa

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/main/java/org/owasp/esapi/SecurityConfiguration.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,19 @@ public interface SecurityConfiguration extends EsapiPropertyLoader {
378378
/**
379379
* Get a string indicating how to compute an Initialization Vector (IV).
380380
* Currently supported modes are "random" to generate a random IV or
381-
* "fixed" to use a fixed (static) IV. If a "fixed" IV is chosen, then the
381+
* "fixed" to use a fixed (static) IV.
382+
*
383+
* <b>WARNING:</b> 'fixed' was only intended to support legacy applications with
384+
* fixed IVs, but the use of non-random IVs is inherently insecure,
385+
* especially for any supported cipher mode that is considered a streaming mode
386+
* (which is basically anything except CBC for modes that support require an IV).
387+
* For this reason, 'fixed' is considered <b>deprecated</b> and will be
388+
* removed during the next ESAPI point release (tentatively, 2.3).
389+
* However, note that if a "fixed" IV is chosen, then the
382390
* the value of this fixed IV must be specified as the property
383391
* {@code Encryptor.fixedIV} and be of the appropriate length.
384392
*
385-
* @return A string specifying the IV type. Should be "random" or "fixed".
393+
* @return A string specifying the IV type. Should be "random" or "fixed" (dereprected).
386394
*
387395
* @see #getFixedIV()
388396
* @deprecated Use SecurityConfiguration.getStringProp("appropriate_esapi_prop_name") instead.
@@ -398,7 +406,8 @@ public interface SecurityConfiguration extends EsapiPropertyLoader {
398406
* instead. Longer term: There will be a more general method in JavaEncryptor
399407
* to explicitly set an IV. This whole concept of a single fixed IV has
400408
* always been a kludge at best, as a concession to those who have used
401-
* a single fixed IV in the past. It's time to put it to death
409+
* a single fixed IV in the past to support legacy applications. This method will be
410+
* killed off in the next ESAPI point release (likely 2.3). It's time to put it to death
402411
* as it was never intended for production in the first place.
403412
*/
404413
@Deprecated

0 commit comments

Comments
 (0)