Привет, друзья! У меня дома есть задание из моего университета, и я не знаю, как ответить на некоторые вопросы. Я ценю некоторую помощь.
1. Прежде всего мне нужно сгенерировать ключ с открытой библиотекой ssl
openssl genrsa -out private.pem 1024
Вопрос: Какой метод используется для создания ключа? (Я думаю RSA?)
Cat private.pem Вопрос: Каков верхний и нижний колонтитулы файла Вывод:
cat private.pem
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCXz+Vo+e6mX4HBMWdhmmLpbeQhlRhO+Ie8KQLmFlbOKHWaSeKJ
YJF21iadaNKdZUxVSCSpFHPvfdv7KtmiXj6xcGIaFQRKZbeAepTOiowpIBIvyunc
BMk6+PrkIR0ULiLdgmRZy5xVuy3pL58f4GwF/ZeyfeHDMzi0JBAZ01boswIDAQAB
AoGAYqnx3gz5ZlWR/d4+4zc0a6NI7e55UvHBPa+lu6XvGqM+81xrh38kawh5Jjp3
D2ZDevWdJeouAwtYSd+qfBUmRqmU3kJTSMU7hpIn3Lpk/0yWVVEamVMDi+DTwP4z
5dgrwFfFeb7rkA+bcBSAb/b0bKZiB1sIIgC3Q1kLytYf88ECQQDFUzV95y9ja5JP
qj0BfwnBgR7u+eKrfvROcDzDYjr5uJZgq6JfRPRrIhfBDQXcPBKwPmW3Z9Qgh7xO
WNOYEW7hAkEAxPQl0FEz79lWcY9FhUQxAym99hzz/vFjo9SKWSmjMGcTxqKnwf5M
6ZWSYif6xy+Gqm1uI3dG7wGOC1h9zEduEwJAfE1CcSFlFLf63vxamcqxFpiEJ/55
75Z1x8OkQ2Bpzk2dTSBRlLoXTjWXySCvBGFDVIq6AKMDWcqnsKL8B9tTgQJBAKie
DbGnk7uIasWWT4KkuwFmP0fxycM+jnu4fymOyDOsS/YHU3B2cwqYD1cRu1XEjppi
TaT3fTcqMZ3tCOZXURkCQCK9GUaRw0EJNp7X+QkH0HipuIdSQxeey26yGu3IS4xm
EZEoRxgpP/bSdgqL3uLZzTqW36fzwDUSa5xIOCDSvU8=
-----END RSA PRIVATE KEY-----
Вопрос: каково значение publi c key
openssl rsa -in private.pem -text
Output:
Private-Key: (1024 bit)
modulus:
00:97:cf:e5:68:f9:ee:a6:5f:81:c1:31:67:61:9a:
62:e9:6d:e4:21:95:18:4e:f8:87:bc:29:02:e6:16:
56:ce:28:75:9a:49:e2:89:60:91:76:d6:26:9d:68:
d2:9d:65:4c:55:48:24:a9:14:73:ef:7d:db:fb:2a:
d9:a2:5e:3e:b1:70:62:1a:15:04:4a:65:b7:80:7a:
94:ce:8a:8c:29:20:12:2f:ca:e9:dc:04:c9:3a:f8:
fa:e4:21:1d:14:2e:22:dd:82:64:59:cb:9c:55:bb:
2d:e9:2f:9f:1f:e0:6c:05:fd:97:b2:7d:e1:c3:33:
38:b4:24:10:19:d3:56:e8:b3
publicExponent: 65537 (0x10001)
privateExponent:
62:a9:f1:de:0c:f9:66:55:91:fd:de:3e:e3:37:34:
6b:a3:48:ed:ee:79:52:f1:c1:3d:af:a5:bb:a5:ef:
1a:a3:3e:f3:5c:6b:87:7f:24:6b:08:79:26:3a:77:
0f:66:43:7a:f5:9d:25:ea:2e:03:0b:58:49:df:aa:
7c:15:26:46:a9:94:de:42:53:48:c5:3b:86:92:27:
dc:ba:64:ff:4c:96:55:51:1a:99:53:03:8b:e0:d3:
c0:fe:33:e5:d8:2b:c0:57:c5:79:be:eb:90:0f:9b:
70:14:80:6f:f6:f4:6c:a6:62:07:5b:08:22:00:b7:
43:59:0b:ca:d6:1f:f3:c1
prime1:
00:c5:53:35:7d:e7:2f:63:6b:92:4f:aa:3d:01:7f:
09:c1:81:1e:ee:f9:e2:ab:7e:f4:4e:70:3c:c3:62:
3a:f9:b8:96:60:ab:a2:5f:44:f4:6b:22:17:c1:0d:
05:dc:3c:12:b0:3e:65:b7:67:d4:20:87:bc:4e:58:
d3:98:11:6e:e1
prime2:
00:c4:f4:25:d0:51:33:ef:d9:56:71:8f:45:85:44:
31:03:29:bd:f6:1c:f3:fe:f1:63:a3:d4:8a:59:29:
a3:30:67:13:c6:a2:a7:c1:fe:4c:e9:95:92:62:27:
fa:c7:2f:86:aa:6d:6e:23:77:46:ef:01:8e:0b:58:
7d:cc:47:6e:13
exponent1:
7c:4d:42:71:21:65:14:b7:fa:de:fc:5a:99:ca:b1:
16:98:84:27:fe:79:ef:96:75:c7:c3:a4:43:60:69:
ce:4d:9d:4d:20:51:94:ba:17:4e:35:97:c9:20:af:
04:61:43:54:8a:ba:00:a3:03:59:ca:a7:b0:a2:fc:
07:db:53:81
exponent2:
00:a8:9e:0d:b1:a7:93:bb:88:6a:c5:96:4f:82:a4:
bb:01:66:3f:47:f1:c9:c3:3e:8e:7b:b8:7f:29:8e:
c8:33:ac:4b:f6:07:53:70:76:73:0a:98:0f:57:11:
bb:55:c4:8e:9a:62:4d:a4:f7:7d:37:2a:31:9d:ed:
08:e6:57:51:19
coefficient:
22:bd:19:46:91:c3:41:09:36:9e:d7:f9:09:07:d0:
78:a9:b8:87:52:43:17:9e:cb:6e:b2:1a:ed:c8:4b:
8c:66:11:91:28:47:18:29:3f:f6:d2:76:0a:8b:de:
e2:d9:cd:3a:96:df:a7:f3:c0:35:12:6b:9c:48:38:
20:d2:bd:4f
writing RSA key
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCXz+Vo+e6mX4HBMWdhmmLpbeQhlRhO+Ie8KQLmFlbOKHWaSeKJ
YJF21iadaNKdZUxVSCSpFHPvfdv7KtmiXj6xcGIaFQRKZbeAepTOiowpIBIvyunc
BMk6+PrkIR0ULiLdgmRZy5xVuy3pL58f4GwF/ZeyfeHDMzi0JBAZ01boswIDAQAB
AoGAYqnx3gz5ZlWR/d4+4zc0a6NI7e55UvHBPa+lu6XvGqM+81xrh38kawh5Jjp3
D2ZDevWdJeouAwtYSd+qfBUmRqmU3kJTSMU7hpIn3Lpk/0yWVVEamVMDi+DTwP4z
5dgrwFfFeb7rkA+bcBSAb/b0bKZiB1sIIgC3Q1kLytYf88ECQQDFUzV95y9ja5JP
qj0BfwnBgR7u+eK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