Skip to content

Commit 0ab470c

Browse files
committed
Remove references to old 1.4 crypto stuff and indicate that fixed IVs is deprecated and will disappear next release (2.3).
Also added warning comments at the beginning to discourage use of test version of ESAPI.properties file.
1 parent 63c3907 commit 0ab470c

File tree

1 file changed

+39
-27
lines changed

1 file changed

+39
-27
lines changed

src/test/resources/esapi/ESAPI.properties

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
#
22
# OWASP Enterprise Security API (ESAPI) Properties file -- TEST Version
3+
#############################################################################
4+
#
5+
# ####### # #
6+
# # ###### #### ##### # # ###### ##### ####
7+
# # # # # # # # # # #
8+
# # ##### #### # # # ##### # # ####
9+
# # # # # # # # ##### #
10+
# # # # # # # # # # # # #
11+
# # ###### #### # # ###### # # ####
12+
#
13+
# This is NOT the version of ESAPI.properties that you are looking for.
14+
#
15+
# That is over in the 'configuration/esapi/ESAPI.properties' file. You
16+
# should retrieve THAT version from the official GitHub report from
17+
# https://github.com/ESAPI/esapi-java-legacy/blob/develop/configuration/esapi/ESAPI.properties
18+
# but make sure that you select it from the 'master' branch (which will
19+
# correspond to the latest official ESAPI relase). Sorry for the
20+
# inconvenience. We are trying to figure out how to get it to the official
21+
# "esapi-<releaseVersion>-sources.jar fiel available from Maven Central, but
22+
# in the meantime, you will have to get it from GitHub.
23+
#
24+
# PLEASE do not base your production use of ESAPI on this TEST version of
25+
# ESAPI.properties as this test version has been dummed down in several places
26+
# for JUnit testing.
27+
#
28+
# You have been warned.
29+
#
30+
#############################################################################
331
#
432
# This file is part of the Open Web Application Security Project (OWASP)
533
# Enterprise Security API (ESAPI) project. For details, please see
@@ -32,14 +60,6 @@
3260
# file-based implementations, that some files may need to be read-write as they
3361
# get updated dynamically.
3462
#
35-
# Before using, be sure to update the MasterKey and MasterSalt as described below.
36-
# N.B.: If you had stored data that you have previously encrypted with ESAPI 1.4,
37-
# you *must* FIRST decrypt it using ESAPI 1.4 and then (if so desired)
38-
# re-encrypt it with ESAPI 2.0. If you fail to do this, you will NOT be
39-
# able to decrypt your data with ESAPI 2.0.
40-
#
41-
# YOU HAVE BEEN WARNED!!! More details are in the ESAPI 2.0 Release Notes.
42-
#
4363
#===========================================================================
4464
# ESAPI Configuration
4565
#
@@ -134,21 +154,6 @@ Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec
134154
# unlimited strength policy files and install in the lib directory of your JRE/JDK.
135155
# See http://java.sun.com/javase/downloads/index.jsp for more information.
136156
#
137-
# Backward compatibility with ESAPI Java 1.4 is supported by the two deprecated API
138-
# methods, Encryptor.encrypt(String) and Encryptor.decrypt(String). However, whenever
139-
# possible, these methods should be avoided as they use ECB cipher mode, which in almost
140-
# all circumstances a poor choice because of it's weakness. CBC cipher mode is the default
141-
# for the new Encryptor encrypt / decrypt methods for ESAPI Java 2.0. In general, you
142-
# should only use this compatibility setting if you have persistent data encrypted with
143-
# version 1.4 and even then, you should ONLY set this compatibility mode UNTIL
144-
# you have decrypted all of your old encrypted data and then re-encrypted it with
145-
# ESAPI 2.0 using CBC mode. If you have some reason to mix the deprecated 1.4 mode
146-
# with the new 2.0 methods, make sure that you use the same cipher algorithm for both
147-
# (256-bit AES was the default for 1.4; 128-bit is the default for 2.0; see below for
148-
# more details.) Otherwise, you will have to use the new 2.0 encrypt / decrypt methods
149-
# where you can specify a SecretKey. (Note that if you are using the 256-bit AES,
150-
# that requires downloading the special jurisdiction policy files mentioned above.)
151-
#
152157
# ***** IMPORTANT: These are for JUnit testing. Test files may have been
153158
# encrypted using these values so do not change these or
154159
# those tests will fail. The version under
@@ -252,10 +257,9 @@ Encryptor.cipher_modes.additional_allowed=CBC,ECB
252257
# cipher transformation, otherwise this will be ignored after logging a
253258
# warning.
254259
#
255-
# NOTE: This is what applies BOTH ESAPI 1.4 and 2.0. See warning above about mixing!
256260
Encryptor.EncryptionKeyLength=128
257261

258-
# Because 2.0 uses CBC mode by default, it requires an initialization vector (IV).
262+
# Because 2.x uses CBC mode by default, it requires an initialization vector (IV).
259263
# (All cipher modes except ECB require an IV.) There are two choices: we can either
260264
# use a fixed IV known to both parties or allow ESAPI to choose a random IV. While
261265
# the IV does not need to be hidden from adversaries, it is important that the
@@ -266,17 +270,25 @@ Encryptor.EncryptionKeyLength=128
266270
# IVs. If you wish to use 'fixed' IVs, set 'Encryptor.ChooseIVMethod=fixed' and
267271
# uncomment the Encryptor.fixedIV.
268272
#
269-
# Valid values: random|fixed|specified 'specified' not yet implemented; planned for 2.1
273+
# Valid values: random|fixed|specified 'specified' not yet implemented; planned for 2.3
274+
# 'fixed' is deprecated as of 2.2
275+
# and will be removed in 2.3.
270276
Encryptor.ChooseIVMethod=random
277+
278+
271279
# If you choose to use a fixed IV, then you must place a fixed IV here that
272280
# is known to all others who are sharing your secret key. The format should
273281
# be a hex string that is the same length as the cipher block size for the
274-
# cipher algorithm that you are using. The following is an example for AES
282+
# cipher algorithm that you are using. The following is an *example* for AES
275283
# from an AES test vector for AES-128/CBC as described in:
276284
# NIST Special Publication 800-38A (2001 Edition)
277285
# "Recommendation for Block Cipher Modes of Operation".
278286
# (Note that the block size for AES is 16 bytes == 128 bits.)
279287
#
288+
# @Deprecated -- fixed IVs are deprecated as of the 2.2 release and support
289+
# will be removed in the next release (tentatively, 2.3).
290+
# If you MUST use this, at least replace this IV with one
291+
# that your legacy application was using.
280292
Encryptor.fixedIV=0x000102030405060708090a0b0c0d0e0f
281293

282294
# Whether or not CipherText should use a message authentication code (MAC) with it.

0 commit comments

Comments
 (0)