BLu85 / AES-GCM-128-192-256-bits

Configurable AES-GCM IP (128, 192, 256 bits)
20 stars 6 forks source link

maybe a python issue #6

Closed lcy0816 closed 10 months ago

lcy0816 commented 10 months ago

Hello,

I have checked my python3 version is over 3.5 but could not do the command mentioned in the config page:

bash-4.2$ cd config/ bash-4.2$ python gcm_config.py --mode 256 --size L --pipe 0 Traceback (most recent call last): File "gcm_config.py", line 11, in conf.gcm_ip_config() File "/home/chenyang/common/smb_files/git/AES-GCM-128-192-256-bits/config/gcm_utils.py", line 225, in gcm_ip_config self.set_default_value(self.args.ngfmul, seed, 'n_gfmul_ip', 1) AttributeError: 'Namespace' object has no attribute 'ngfmul' bash-4.2$ python3 gcm_config.py --mode 256 --size L --pipe 0 Traceback (most recent call last): File "gcm_config.py", line 11, in conf.gcm_ip_config() File "/home/chenyang/common/smb_files/git/AES-GCM-128-192-256-bits/config/gcm_utils.py", line 225, in gcm_ip_config self.set_default_value(self.args.ngfmul, seed, 'n_gfmul_ip', 1) AttributeError: 'Namespace' object has no attribute 'ngfmul' bash-4.2$ python gcm_config --help python: can't open file 'gcm_config': [Errno 2] No such file or directory bash-4.2$ python3 --version Python 3.6.8

I suspect this maybe a python issue but a quick search online could not give me the solution, do you have any ideas on this?

thanks lcy0816

BLu85 commented 10 months ago

Hi @lcy0816

Thanks for spotting this error. This commit should fix the error.

lcy0816 commented 10 months ago

thanks tested and works! however, I dont see gcm_config generated under config..

lcy0816@apple-mac config % python3 gcm_config.py --mode 256 --size L --pipe 0

rm: ../src/gen_rtl/: No such file or directory ../src/gen_rtl/

OK : File ../src/gen_rtl/aes_round.vhd has been successfully generated OK : File ../src/gen_rtl/aes_kexp.vhd has been successfully generated OK : File ../src/gen_rtl/aes_ecb.vhd has been successfully generated OK : File ../src/gen_rtl/top_aes_gcm.vhd has been successfully generated OK : AES-GCM IP configured as: OK : aes_size : L OK : aes_mode : 256 OK : enc_dec : enc OK : pipes_in_core : 0 OK : n_gfmul_ip : 1 OK : n_rounds : 14 OK : key_pre_exp : False lcy0816@apple-mac config % python3 gcm_config -m 192

/usr/local/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/lcy0816/Documents/git/AES-GCM-128-192-256-bits/config/gcm_config': [Errno 2] No such file or directory lcy0816@apple-mac config % python3 gcm_config -m 256 /usr/local/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/lcy0816/Documents/git/AES-GCM-128-192-256-bits/config/gcm_config': [Errno 2] No such file or directory lcy0816@apple-mac config % ls pycache config_aes_kexp.py config_aes_round.py gcm_config.py config_aes_ecb.py config_aes_kprexp.py config_aes_top.py gcm_utils.py

BLu85 commented 10 months ago

Sorry, I don't understand the problem you are trying to report. Do you see the file gcm_config.py in the config folder?

What do you get if you run python3 gcm_config.py -m 192 from the config directory?

lcy0816 commented 10 months ago

sorry, my bad, should be gcm_config.py not gcm_config, we can close this issue