File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,16 @@ def test_nonzero_padding(self):
231
231
)
232
232
eq_ (ex .exception .message , "Bad padding" )
233
233
234
+ def test_damage (self ):
235
+ with assert_raises (ECEException ) as ex :
236
+ ece .decrypt (
237
+ self .m_header + b'\xbb \xc6 \xb1 \x1d F:~\x0f \x07 +\xbe \xaa D\xe0 \xd6 .K\xe5 \xf9 ]%\xe3 \x86 q\xe0 }' ,
238
+ version = 'aes128gcm' ,
239
+ key = b'd\xc7 \x0e d\xa7 %U\x14 Q\xf2 \x08 \xdf \xba \xa0 \xb9 r' ,
240
+ keyid = b64e (os .urandom (192 )), # 256 bytes
241
+ )
242
+ eq_ (ex .exception .message , "Decryption error: InvalidTag()" )
243
+
234
244
235
245
class TestEceIntegration (unittest .TestCase ):
236
246
@@ -455,7 +465,6 @@ def _run(self, mode):
455
465
outp = 'input'
456
466
457
467
for data in self .legacy_data :
458
- print (repr (data ))
459
468
p = data ['params' ][mode ]
460
469
if 'keys' in data :
461
470
key = None
You can’t perform that action at this time.
0 commit comments