kcd.Spektor wrote:jrb00001 wrote:
Symmetric encryption is useless because it has to be the same key on all servers and clients.
Why is this useless?
Why not have the key hardcoded somewhere?
kcd.Spektor wrote:And what about having 1 key hardcoded for everyone?
If everyone has access to the key it is not private. As the name says, the private key must be private.
kcd.Spektor wrote:How will the attacker find the server key? It can be hidden in all other info data that the server is sending to the client.
That sounds like security through obscurity (
https://en.wikipedia.org/wiki/Security_ ... _obscurity). Very unsafe because the attacker could use your own program to extract the key from the data.
kcd.Spektor wrote:Can you give me a common example of a key?
Symmetric key (256 bit AES encoded as hex):
Code: Select all
107358B13BAAAC4FE253A4A933907B25D88B1F2D9598F968FAFFF04059E286F6
Asymmetric private key (512 bit RSA encoded as hex):
Code: Select all
30820153020100300D06092A864886F70D01010105000482013D308201390201000241008564CA0A80A50A334954A7C8E4E769E90A41441ECFC91B350C71DDC0F9E63EDB6971D149AEBD1D4F42245F6A507B455475E037F35281083348E1F38F28F8DF83020301000102402BF3CBC6AE20B33DB6D9D7F70FC558565AF4AA5764ABA4F553C66904DED288BF152921BBD780BFD2A940E7F08B8B43EDCE64EBD2B2B86506BCC742FF880682A1022100BE2F7394D1A1CA7302081B4B7040DBA5EFC7CC233AF022469F7ED048ED76324B022100B38E284080AD50E02C6F9E095A62C623A0069CB53EDD5DE8A82D9432722984A90220654EA584DA7E12775CD7B0A268B343CD8A82A54D06F22F6FEB3A03FD34F0C72D022073E38DD14BFC11160F381F5D540C2A6C75EDAE9940B0E9DAAF2973DC3758DAB9022022982C61ACA8C858BE180CA85DE2CEC12900FD471D226592E4E579602C5931C6
Asymmetric public key (512 bit RSA encoded as hex):
Code: Select all
305C300D06092A864886F70D0101010500034B0030480241008564CA0A80A50A334954A7C8E4E769E90A41441ECFC91B350C71DDC0F9E63EDB6971D149AEBD1D4F42245F6A507B455475E037F35281083348E1F38F28F8DF830203010001
As I said, keys are just huge numbers. Good RSA keys have a size of at least 4096 bits.