Thanks Alex for the reference and clearing my doubts. Seems like I should be using the term AES-256 in my use case.
On Fri, Feb 3, 2023 at 9:15 AM Alex Gaynor <alex.gay...@gmail.com> wrote: > In pyca/cryptography, one uses the AES() class and gets AES-128 or > AES-256 depending on the key size: > > https://cryptography.io/en/latest/hazmat/primitives/symmetric-encryption/#cryptography.hazmat.primitives.ciphers.algorithms.AES > > You can also use the AES128 and AES256 types explicitly if you prefer. > > Alex > > On Thu, Feb 2, 2023 at 8:14 PM Arshad Khan <khan.m.ars...@gmail.com> > wrote: > > > > Thanks Alex for the quick reply. > > > > So in my case it can be said that I am using AES-256-CTR cipher? Because > I was calling it AES-128-CTR and people were asking me why I am using a > smaller key. > > > > On Fri, Feb 3, 2023 at 9:09 AM Alex Gaynor <alex.gay...@gmail.com> > wrote: > >> > >> This is not correct, block size and key size are not the same thing > >> for symmetric encryption algorithms. > >> > >> AES's block size is always 128-bit, it's not something cryptography > >> chooses to use, it's the definition of the algorithm. > >> > >> Alex > >> > >> On Thu, Feb 2, 2023 at 8:02 PM Arshad Khan <khan.m.ars...@gmail.com> > wrote: > >> > > >> > Hello > >> > > >> > I have a question regarding AES in python cryptography which uses a > block size of 128 bits. Currently I am using 256 bit keys with AES in CTR > mode. However, internally the python cryptography uses a block size of 128. > My understanding is that block size and key size are the same for symmetric > encryption. How does a 256 bits key work in this case? Appreciate if > someone could provide some explanation about this and clear my confusion. > >> > > >> > Thanks > >> > Arshad > >> > _______________________________________________ > >> > Cryptography-dev mailing list > >> > Cryptography-dev@python.org > >> > https://mail.python.org/mailman/listinfo/cryptography-dev > >> > >> > >> > >> -- > >> All that is necessary for evil to succeed is for good people to do > nothing. > >> _______________________________________________ > >> Cryptography-dev mailing list > >> Cryptography-dev@python.org > >> https://mail.python.org/mailman/listinfo/cryptography-dev > > > > _______________________________________________ > > Cryptography-dev mailing list > > Cryptography-dev@python.org > > https://mail.python.org/mailman/listinfo/cryptography-dev > > > > -- > All that is necessary for evil to succeed is for good people to do nothing. > _______________________________________________ > Cryptography-dev mailing list > Cryptography-dev@python.org > https://mail.python.org/mailman/listinfo/cryptography-dev >
_______________________________________________ Cryptography-dev mailing list Cryptography-dev@python.org https://mail.python.org/mailman/listinfo/cryptography-dev