@@ -107,8 +107,7 @@ private module CryptodomeModel {
107107 /**
108108 * A cryptographic operation on an instance from the `Cipher` subpackage of `Cryptodome`/`Crypto`.
109109 */
110- class CryptodomeGenericCipherOperation extends Cryptography:: CryptographicOperation:: Range ,
111- DataFlow:: CallCfgNode
110+ class CryptodomeGenericCipherOperation extends Cryptography:: CryptographicOperation:: Range instanceof DataFlow:: CallCfgNode
112111 {
113112 string methodName ;
114113 string cipherName ;
@@ -134,31 +133,31 @@ private module CryptodomeModel {
134133
135134 override DataFlow:: Node getAnInput ( ) {
136135 methodName = "encrypt" and
137- result in [ this .getArg ( 0 ) , this .getArgByName ( [ "message" , "plaintext" ] ) ]
136+ result in [ super .getArg ( 0 ) , super .getArgByName ( [ "message" , "plaintext" ] ) ]
138137 or
139138 methodName = "decrypt" and
140- result in [ this .getArg ( 0 ) , this .getArgByName ( "ciphertext" ) ]
139+ result in [ super .getArg ( 0 ) , super .getArgByName ( "ciphertext" ) ]
141140 or
142141 // for the following methods, method signatures can be found in
143142 // https://pycryptodome.readthedocs.io/en/latest/src/cipher/modern.html
144143 methodName = "update" and
145- result in [ this .getArg ( 0 ) , this .getArgByName ( "data" ) ]
144+ result in [ super .getArg ( 0 ) , super .getArgByName ( "data" ) ]
146145 or
147146 // although `mac_tag` is used as the parameter name in the spec above, some implementations use `received_mac_tag`, for an example, see
148147 // https://github.com/Legrandin/pycryptodome/blob/5dace638b70ac35bb5d9b565f3e75f7869c9d851/lib/Crypto/Cipher/ChaCha20_Poly1305.py#L207
149148 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" ] ) ]
151150 or
152151 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" ) ]
154153 or
155154 methodName = "encrypt_and_digest" and
156- result in [ this .getArg ( 0 ) , this .getArgByName ( "plaintext" ) ]
155+ result in [ super .getArg ( 0 ) , super .getArgByName ( "plaintext" ) ]
157156 or
158157 methodName = "decrypt_and_verify" and
159158 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" )
162161 ]
163162 }
164163
@@ -180,8 +179,7 @@ private module CryptodomeModel {
180179 /**
181180 * A cryptographic operation on an instance from the `Signature` subpackage of `Cryptodome`/`Crypto`.
182181 */
183- class CryptodomeGenericSignatureOperation extends Cryptography:: CryptographicOperation:: Range ,
184- DataFlow:: CallCfgNode
182+ class CryptodomeGenericSignatureOperation extends Cryptography:: CryptographicOperation:: Range instanceof DataFlow:: CallCfgNode
185183 {
186184 API:: CallNode newCall ;
187185 string methodName ;
@@ -206,13 +204,13 @@ private module CryptodomeModel {
206204
207205 override DataFlow:: Node getAnInput ( ) {
208206 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
210208 or
211209 methodName = "verify" and
212210 (
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
214212 or
215- result in [ this .getArg ( 1 ) , this .getArgByName ( "signature" ) ]
213+ result in [ super .getArg ( 1 ) , super .getArgByName ( "signature" ) ]
216214 )
217215 }
218216
@@ -222,8 +220,7 @@ private module CryptodomeModel {
222220 /**
223221 * A cryptographic operation on an instance from the `Hash` subpackage of `Cryptodome`/`Crypto`.
224222 */
225- class CryptodomeGenericHashOperation extends Cryptography:: CryptographicOperation:: Range ,
226- DataFlow:: CallCfgNode
223+ class CryptodomeGenericHashOperation extends Cryptography:: CryptographicOperation:: Range instanceof DataFlow:: CallCfgNode
227224 {
228225 API:: CallNode newCall ;
229226 string hashName ;
@@ -244,7 +241,7 @@ private module CryptodomeModel {
244241
245242 override Cryptography:: CryptographicAlgorithm getAlgorithm ( ) { result .matchesName ( hashName ) }
246243
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" ) ] }
248245
249246 override Cryptography:: BlockMode getBlockMode ( ) { none ( ) }
250247 }
0 commit comments