os/ossrv/stdlibs/libcrypt/test/group/test_data.dat
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/stdlibs/libcrypt/test/group/test_data.dat	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,308 @@
     1.4 +// COMMENTS SHOULD ALWAYS BEGIN IN A NEW LINE, NEVER EMBED COMMENTS WITHIN DATA
     1.5 +
     1.6 +ENCRYPT_TEST_DATA_1
     1.7 +// To test setkey() and encrypt() functions with  all zeroes as key and data
     1.8 +KEY            :0000000000000000000000000000000000000000000000000000000000000000
     1.9 +DATA_BLOCK     :0000000000000000000000000000000000000000000000000000000000000000
    1.10 +// A value of 0 indicates encryption
    1.11 +ED_FLAG        :0
    1.12 +EXPECTED_OUTPUT:1000110010100110010011011110100111000001101100010010001110100111
    1.13 +END_TEST_DATA
    1.14 +
    1.15 +ENCRYPT_TEST_DATA_2
    1.16 +// To test setkey() and encrypt() functions with  all zeroes as key
    1.17 +KEY            :0000000000000000000000000000000000000000000000000000000000000000
    1.18 +DATA_BLOCK     :0000100110000000000000011110110100001001100001010000010100101100
    1.19 +// A value of 0 indicates encryption
    1.20 +ED_FLAG        :0
    1.21 +EXPECTED_OUTPUT:0110110110000110111111010111001001101010001000001011011010110001
    1.22 +END_TEST_DATA
    1.23 +
    1.24 +ENCRYPT_TEST_DATA_3
    1.25 +// To test setkey() and encrypt() functions with all ones in the bit vectors of
    1.26 +// both key and data
    1.27 +KEY            :1111111111111111111111111111111111111111111111111111111111111111
    1.28 +DATA_BLOCK     :1111111111111111111111111111111111111111111111111111111111111111
    1.29 +// A value of 0 indicates encryption
    1.30 +ED_FLAG        :0
    1.31 +EXPECTED_OUTPUT:0111001101011001101100100001011000111110010011101101110001011000
    1.32 +END_TEST_DATA
    1.33 +
    1.34 +ENCRYPT_TEST_DATA_4
    1.35 +// To test setkey() and encrypt() functions with all ones in the bit vector of
    1.36 +// key
    1.37 +KEY            :1111111111111111111111111111111111111111111111111111111111111111
    1.38 +DATA_BLOCK     :0111000101110011011000110111010011010001011010010110111101111111
    1.39 +// A value of 0 indicates encryption
    1.40 +ED_FLAG        :0
    1.41 +EXPECTED_OUTPUT:1101100001000111000111011001010111011111101101101111101010001100
    1.42 +END_TEST_DATA
    1.43 +
    1.44 +ENCRYPT_TEST_DATA_5
    1.45 +// To test setkey() and encrypt() functions
    1.46 +KEY            :0101101001111010101010100101110001111101101010100111011111101010
    1.47 +DATA_BLOCK     :0000100110000000000000011110110100001001100001010000010100101100
    1.48 +// A value of 0 indicates encryption
    1.49 +ED_FLAG        :0
    1.50 +EXPECTED_OUTPUT:1001110010101010100010100010111111100110001001001101000000111110
    1.51 +END_TEST_DATA
    1.52 +
    1.53 +ENCRYPT_TEST_DATA_6
    1.54 +// To test setkey() and encrypt() functions. KEY value is unchanged
    1.55 +KEY            :0101101001111010101010100101110001111101101010100111011111101010
    1.56 +DATA_BLOCK     :0111000101110011011000110111010011010001011010010110111101111111
    1.57 +// A value of 0 indicates encryption
    1.58 +ED_FLAG        :0
    1.59 +EXPECTED_OUTPUT:1010100110000001111010011100110101001111111010111001100000110100
    1.60 +END_TEST_DATA
    1.61 +
    1.62 +ENCRYPT_TEST_DATA_7
    1.63 +// To test setkey() and encrypt() function. Key value is unchanged
    1.64 +KEY            :0101101001111010101010100101110001111101101010100111011111101010
    1.65 +DATA_BLOCK     :0000000000000000000000000000000000000000000000000000000000000000
    1.66 +// A value of 0 indicates encryption
    1.67 +ED_FLAG        :0
    1.68 +EXPECTED_OUTPUT:1111111101110111111110100101100000110110100100001110000110111111
    1.69 +END_TEST_DATA
    1.70 +
    1.71 +ENCRYPT_TEST_DATA_8
    1.72 +// To test setkey() and encrypt() function. Key value is unchanged
    1.73 +KEY            :0101101001111010101010100101110001111101101010100111011111101010
    1.74 +DATA_BLOCK     :1111111111111111111111111111111111111111111111111111111111111111
    1.75 +// A value of 0 indicates encryption
    1.76 +ED_FLAG        :0
    1.77 +EXPECTED_OUTPUT:   1111110011010110011011000110100010111111001110111000011111101100
    1.78 +END_TEST_DATA
    1.79 +
    1.80 +ENCRYPT_TEST_DATA_9
    1.81 +// To test setkey() and encrypt() function. ED_FLAG changed to denote a decrypt action.
    1.82 +KEY            :0101101001111010101010100101110001111101101010100111011111101010
    1.83 +DATA_BLOCK     :1111110011010110011011000110100010111111001110111000011111101100
    1.84 +// A value of 0 indicates encryption
    1.85 +ED_FLAG        :1
    1.86 +EXPECTED_OUTPUT:   11111111111111111111111111111111111111111111111111111111111111111
    1.87 +END_TEST_DATA
    1.88 +
    1.89 +CRYPT_TEST_DATA_1
    1.90 +// To test crypt() function - DES algorithm. Password-eight characters in length
    1.91 +PASSWORD       :password
    1.92 +SALT           :XY
    1.93 +EXPECTED_OUTPUT:XYGpusIMIT/IM
    1.94 +END_TEST_DATA
    1.95 +
    1.96 +CRYPT_TEST_DATA_2
    1.97 +// To test crypt() function - DES algorithm. Password-less than eight characters 
    1.98 +// in length
    1.99 +PASSWORD       :passS
   1.100 +SALT           :XY
   1.101 +EXPECTED_OUTPUT:XYGFf3I4Sg2K2
   1.102 +END_TEST_DATA
   1.103 +
   1.104 +CRYPT_TEST_DATA_3
   1.105 +// To test crypt() function - DES algorithm. Password-less than eight characters 
   1.106 +// in length
   1.107 +PASSWORD       :pa
   1.108 +SALT           :9D
   1.109 +EXPECTED_OUTPUT:9DWVv8b/n8C2M
   1.110 +END_TEST_DATA
   1.111 +
   1.112 +CRYPT_TEST_DATA_4
   1.113 +// To test crypt() function - DES algorithm. Password-more than eight characters 
   1.114 +// in length
   1.115 +PASSWORD       :passwordXYTEY
   1.116 +SALT           :.Q
   1.117 +EXPECTED_OUTPUT:.Q7kADsEJ1WMI
   1.118 +END_TEST_DATA
   1.119 +
   1.120 +CRYPT_TEST_DATA_5
   1.121 +// To test crypt() function - DES algorithm. Password-more than eight characters 
   1.122 +// in length - notice that the output depends on the first eight characters of
   1.123 +// the passowrd and "salt".
   1.124 +PASSWORD       :passwordXY367USH
   1.125 +SALT           :.Q
   1.126 +EXPECTED_OUTPUT:.Q7kADsEJ1WMI
   1.127 +END_TEST_DATA
   1.128 +
   1.129 +CRYPT_TEST_DATA_6
   1.130 +// To test crypt() function - DES algorithm. NULL as password with a valid "salt"
   1.131 +PASSWORD       :
   1.132 +SALT           :.Q
   1.133 +EXPECTED_OUTPUT:.QJ.W2gUJgXaI
   1.134 +END_TEST_DATA
   1.135 +
   1.136 +CRYPT_TEST_DATA_7
   1.137 +// To test crypt() function - DES algorithm. NULL as password with a valid "salt"
   1.138 +PASSWORD       :
   1.139 +SALT           :YU
   1.140 +EXPECTED_OUTPUT:YU6VVzA5TJabA
   1.141 +END_TEST_DATA
   1.142 +
   1.143 +CRYPT_TEST_DATA_8
   1.144 +// To test crypt() function - DES algorithm. NULL as password with a valid "salt"
   1.145 +PASSWORD       :
   1.146 +SALT           :/.
   1.147 +EXPECTED_OUTPUT:/.elhbtlysKy6
   1.148 +END_TEST_DATA
   1.149 +
   1.150 +CRYPT_TEST_DATA_9
   1.151 +// To test crypt() function - DES algorithm. NULL as password with a valid "salt"
   1.152 +PASSWORD       :
   1.153 +SALT           ://
   1.154 +EXPECTED_OUTPUT://plGAV7Hp3Zo
   1.155 +END_TEST_DATA
   1.156 +
   1.157 +CRYPT_TEST_DATA_10
   1.158 +// To test crypt() function - DES algorithm. NULL as password with a valid "salt"
   1.159 +PASSWORD       :
   1.160 +SALT           :aB
   1.161 +EXPECTED_OUTPUT:aBtwyC/9wKybE
   1.162 +END_TEST_DATA
   1.163 +
   1.164 +CRYPT_TEST_DATA_11
   1.165 +// To test crypt() function - DES algorithm. Valid password with a "salt" which
   1.166 +// is one-character in length. Output differs from that of Linux's
   1.167 +PASSWORD       :OuEIW90I
   1.168 +SALT           :a
   1.169 +EXPECTED_OUTPUT:
   1.170 +END_TEST_DATA
   1.171 +
   1.172 +CRYPT_TEST_DATA_12
   1.173 +// To test crypt() function - DES algorithm. Valid password with a "salt" which
   1.174 +// is longer two characters in length
   1.175 +PASSWORD       :OuEIW90I
   1.176 +SALT           :iKOI0
   1.177 +EXPECTED_OUTPUT:iKr4GcNvuB/Wk
   1.178 +END_TEST_DATA
   1.179 +
   1.180 +CRYPT_TEST_DATA_13
   1.181 +// To test crypt() function - DES algorithm. A valid password and no "salt"
   1.182 +// Output differs from that of Linux's
   1.183 +PASSWORD       :uShyU7w9
   1.184 +SALT           :
   1.185 +EXPECTED_OUTPUT:
   1.186 +END_TEST_DATA
   1.187 +
   1.188 +CRYPT_TEST_DATA_14
   1.189 +// To test crypt() function. Both password and salt being
   1.190 +// NULL. Output differs from that of Linux's
   1.191 +PASSWORD       :
   1.192 +SALT           :
   1.193 +EXPECTED_OUTPUT:
   1.194 +END_TEST_DATA
   1.195 +
   1.196 +CRYPT_TEST_DATA_15
   1.197 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.198 +// are valid
   1.199 +PASSWORD       :password
   1.200 +SALT           :$1$
   1.201 +EXPECTED_OUTPUT:$1$$I2o9Z7NcvQAKp7wyCTlia0
   1.202 +END_TEST_DATA
   1.203 +
   1.204 +CRYPT_TEST_DATA_16
   1.205 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.206 +// are valid with password being more than 8 characters in length
   1.207 +PASSWORD       :passwordUEI091H
   1.208 +SALT           :$1$
   1.209 +EXPECTED_OUTPUT:$1$$V1X9nybzyUbSXdm8CAqve.
   1.210 +END_TEST_DATA
   1.211 +
   1.212 +CRYPT_TEST_DATA_018
   1.213 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.214 +// are valid with password being more than 8 characters in length, and
   1.215 +// '/' embedded within the string. Salt consists of "$1$" followed
   1.216 +// by eight characters, and terminated by "$"
   1.217 +PASSWORD       :pass//rdI09Y.
   1.218 +SALT           :$1$password$
   1.219 +EXPECTED_OUTPUT:$1$password$PnpYLDVZ8stpwScDiSk170
   1.220 +END_TEST_DATA
   1.221 +
   1.222 +CRYPT_TEST_DATA_17
   1.223 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.224 +// are valid with password being more than 8 characters in length, and
   1.225 +// '/' embedded within the string. Salt consists of "$1$" followed
   1.226 +// by eight characters, and NOT terminated by "$"
   1.227 +PASSWORD       :pass//rdI09Y.
   1.228 +SALT           :$1$password
   1.229 +EXPECTED_OUTPUT:$1$password$PnpYLDVZ8stpwScDiSk170
   1.230 +END_TEST_DATA
   1.231 +
   1.232 +CRYPT_TEST_DATA_18
   1.233 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.234 +// are valid with password being more than 8 characters in length, and
   1.235 +// '/' embedded within the string. Salt consists of just "$1$"
   1.236 +PASSWORD       :pass//rdI09Y.
   1.237 +SALT           :$1$
   1.238 +EXPECTED_OUTPUT:$1$$Q.yyUXhIuZxEiqLaLs9Yt/
   1.239 +END_TEST_DATA
   1.240 +
   1.241 +CRYPT_TEST_DATA_19
   1.242 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.243 +// are valid with the length of the password being less than 8.
   1.244 +// Salt consists of just "$1$"
   1.245 +PASSWORD       ://URi
   1.246 +SALT           :$1$
   1.247 +EXPECTED_OUTPUT:$1$$dNOmQGH620K312nN0mn1H/
   1.248 +END_TEST_DATA
   1.249 +
   1.250 +CRYPT_TEST_DATA_20
   1.251 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.252 +// are valid with the length of the password being less than 8.
   1.253 +// Salt consists of "$1$" followed by a string, and terminated by
   1.254 +// "$"
   1.255 +PASSWORD       ://URi
   1.256 +SALT           :$1$paU7$
   1.257 +EXPECTED_OUTPUT:$1$paU7$L1IzpLbp2c1NZn1fI5ZF3/
   1.258 +END_TEST_DATA
   1.259 +
   1.260 +CRYPT_TEST_DATA_21
   1.261 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.262 +// are valid with the length of the password being less than 8.
   1.263 +// Salt consists of "$1$" followed by a string, and NOT terminated by
   1.264 +// "$"
   1.265 +PASSWORD       ://URi
   1.266 +SALT           :$1$paU7
   1.267 +EXPECTED_OUTPUT:$1$paU7$L1IzpLbp2c1NZn1fI5ZF3/
   1.268 +END_TEST_DATA
   1.269 +
   1.270 +CRYPT_TEST_DATA_22
   1.271 +// To test crypt() function - MD5 algorithm. Both password and salt
   1.272 +// are valid with the length of the password being less than 8.
   1.273 +// Salt consists of just "$1$"
   1.274 +PASSWORD       ://URi
   1.275 +SALT           :$1$
   1.276 +EXPECTED_OUTPUT:$1$$dNOmQGH620K312nN0mn1H/
   1.277 +END_TEST_DATA
   1.278 +
   1.279 +CRYPT_TEST_DATA_23
   1.280 +// To test crypt() function - MD5 algorithm. NULL as password and "$1$"
   1.281 +// as salt
   1.282 +PASSWORD       :
   1.283 +SALT           :$1$
   1.284 +EXPECTED_OUTPUT:$1$$qRPK7m23GJusamGpoGLby/
   1.285 +END_TEST_DATA
   1.286 +
   1.287 +CRYPT_TEST_DATA_24
   1.288 +// To test crypt() function - MD5 algorithm. NULL as password. Salt consists
   1.289 +// of "$1$" followed by a string, and terminated by "$"
   1.290 +PASSWORD       :
   1.291 +SALT           :$1$oI./$
   1.292 +EXPECTED_OUTPUT:$1$oI./$rZsQHWhxaiZQFk7TPVtZv0
   1.293 +END_TEST_DATA
   1.294 +
   1.295 +CRYPT_TEST_DATA_25
   1.296 +// To test crypt() function - MD5 algorithm. NULL as password. Salt consists
   1.297 +// of "$1$" followed by a string with a "$" embedded within the string, and 
   1.298 +// NOT terminated by "$"
   1.299 +PASSWORD       :
   1.300 +SALT           :$1$o$./
   1.301 +EXPECTED_OUTPUT:$1$o$q44o3M/kTKnXAewu70WtZ/
   1.302 +END_TEST_DATA
   1.303 +
   1.304 +CRYPT_TEST_DATA_26
   1.305 +// To test crypt() function - MD5 algorithm. NULL as password. Salt consists
   1.306 +// of "$1$" followed by a string, and NOT terminated by "$"
   1.307 +PASSWORD       :
   1.308 +SALT           :$1$oi8URVn
   1.309 +EXPECTED_OUTPUT:$1$oi8URVn$f8o6zSdfLb/OggBchx70f0
   1.310 +END_TEST_DATA
   1.311 +