@@ -107,8 +107,7 @@ private module CryptodomeModel {
107
107
/**
108
108
* A cryptographic operation on an instance from the `Cipher` subpackage of `Cryptodome`/`Crypto`.
109
109
*/
110
- class CryptodomeGenericCipherOperation extends Cryptography:: CryptographicOperation:: Range ,
111
- DataFlow:: CallCfgNode
110
+ class CryptodomeGenericCipherOperation extends Cryptography:: CryptographicOperation:: Range instanceof DataFlow:: CallCfgNode
112
111
{
113
112
string methodName ;
114
113
string cipherName ;
@@ -134,31 +133,31 @@ private module CryptodomeModel {
134
133
135
134
override DataFlow:: Node getAnInput ( ) {
136
135
methodName = "encrypt" and
137
- result in [ this .getArg ( 0 ) , this .getArgByName ( [ "message" , "plaintext" ] ) ]
136
+ result in [ super .getArg ( 0 ) , super .getArgByName ( [ "message" , "plaintext" ] ) ]
138
137
or
139
138
methodName = "decrypt" and
140
- result in [ this .getArg ( 0 ) , this .getArgByName ( "ciphertext" ) ]
139
+ result in [ super .getArg ( 0 ) , super .getArgByName ( "ciphertext" ) ]
141
140
or
142
141
// for the following methods, method signatures can be found in
143
142
// https://pycryptodome.readthedocs.io/en/latest/src/cipher/modern.html
144
143
methodName = "update" and
145
- result in [ this .getArg ( 0 ) , this .getArgByName ( "data" ) ]
144
+ result in [ super .getArg ( 0 ) , super .getArgByName ( "data" ) ]
146
145
or
147
146
// although `mac_tag` is used as the parameter name in the spec above, some implementations use `received_mac_tag`, for an example, see
148
147
// https://github.com/Legrandin/pycryptodome/blob/5dace638b70ac35bb5d9b565f3e75f7869c9d851/lib/Crypto/Cipher/ChaCha20_Poly1305.py#L207
149
148
methodName = "verify" and
150
- result in [ this .getArg ( 0 ) , this .getArgByName ( [ "mac_tag" , "received_mac_tag" ] ) ]
149
+ result in [ super .getArg ( 0 ) , super .getArgByName ( [ "mac_tag" , "received_mac_tag" ] ) ]
151
150
or
152
151
methodName = "hexverify" and
153
- result in [ this .getArg ( 0 ) , this .getArgByName ( "mac_tag_hex" ) ]
152
+ result in [ super .getArg ( 0 ) , super .getArgByName ( "mac_tag_hex" ) ]
154
153
or
155
154
methodName = "encrypt_and_digest" and
156
- result in [ this .getArg ( 0 ) , this .getArgByName ( "plaintext" ) ]
155
+ result in [ super .getArg ( 0 ) , super .getArgByName ( "plaintext" ) ]
157
156
or
158
157
methodName = "decrypt_and_verify" and
159
158
result in [
160
- this .getArg ( 0 ) , this .getArgByName ( "ciphertext" ) , this .getArg ( 1 ) ,
161
- this .getArgByName ( "mac_tag" )
159
+ super .getArg ( 0 ) , super .getArgByName ( "ciphertext" ) , super .getArg ( 1 ) ,
160
+ super .getArgByName ( "mac_tag" )
162
161
]
163
162
}
164
163
@@ -180,8 +179,7 @@ private module CryptodomeModel {
180
179
/**
181
180
* A cryptographic operation on an instance from the `Signature` subpackage of `Cryptodome`/`Crypto`.
182
181
*/
183
- class CryptodomeGenericSignatureOperation extends Cryptography:: CryptographicOperation:: Range ,
184
- DataFlow:: CallCfgNode
182
+ class CryptodomeGenericSignatureOperation extends Cryptography:: CryptographicOperation:: Range instanceof DataFlow:: CallCfgNode
185
183
{
186
184
API:: CallNode newCall ;
187
185
string methodName ;
@@ -206,13 +204,13 @@ private module CryptodomeModel {
206
204
207
205
override DataFlow:: Node getAnInput ( ) {
208
206
methodName = "sign" and
209
- result in [ this .getArg ( 0 ) , this .getArgByName ( "msg_hash" ) ] // Cryptodome.Hash instance
207
+ result in [ super .getArg ( 0 ) , super .getArgByName ( "msg_hash" ) ] // Cryptodome.Hash instance
210
208
or
211
209
methodName = "verify" and
212
210
(
213
- result in [ this .getArg ( 0 ) , this .getArgByName ( "msg_hash" ) ] // Cryptodome.Hash instance
211
+ result in [ super .getArg ( 0 ) , super .getArgByName ( "msg_hash" ) ] // Cryptodome.Hash instance
214
212
or
215
- result in [ this .getArg ( 1 ) , this .getArgByName ( "signature" ) ]
213
+ result in [ super .getArg ( 1 ) , super .getArgByName ( "signature" ) ]
216
214
)
217
215
}
218
216
@@ -222,8 +220,7 @@ private module CryptodomeModel {
222
220
/**
223
221
* A cryptographic operation on an instance from the `Hash` subpackage of `Cryptodome`/`Crypto`.
224
222
*/
225
- class CryptodomeGenericHashOperation extends Cryptography:: CryptographicOperation:: Range ,
226
- DataFlow:: CallCfgNode
223
+ class CryptodomeGenericHashOperation extends Cryptography:: CryptographicOperation:: Range instanceof DataFlow:: CallCfgNode
227
224
{
228
225
API:: CallNode newCall ;
229
226
string hashName ;
@@ -244,7 +241,7 @@ private module CryptodomeModel {
244
241
245
242
override Cryptography:: CryptographicAlgorithm getAlgorithm ( ) { result .matchesName ( hashName ) }
246
243
247
- override DataFlow:: Node getAnInput ( ) { result in [ this .getArg ( 0 ) , this .getArgByName ( "data" ) ] }
244
+ override DataFlow:: Node getAnInput ( ) { result in [ super .getArg ( 0 ) , super .getArgByName ( "data" ) ] }
248
245
249
246
override Cryptography:: BlockMode getBlockMode ( ) { none ( ) }
250
247
}
0 commit comments