Discussion:
[chromium-discuss] How is the pre master key generated?
b***@gmail.com
2018-11-08 04:06:15 UTC
Permalink
A few days ago, my colleague asked me a question about how the pre master
key was generated, because I didn't know much about the https principle at
the time, so I spent a lot of time querying a lot of information and
understanding the process of https creating links. I'm seeing how many
pages are generated for the pre master key and I haven't explained it. I am
browsing this page
https://security.stackexchange.com/questions/63971/how-is-the-premaster-secret-used-in-tls-generated.
The site has two answers, one is 2 The character is the version number and
the remaining 46 characters are random values. Another answer is to use the
RSA or DH algorithm. Both of these answers are the opposite. Then I queried
https://tools.ietf.org/html/rfc5246#section-7.4.7.1. The above explanation
tends to the first answer. So my colleague's explanation is that the pre
master key is generated by the system using a random value generator.
Colleagues say that the value of pre master key is generated using random_C
and random_S, and neither of us can convince anyone. So come over and ask a
professional. How is the pre master key generated?

I am using this document translated by Google. Chinese original text is as
follows:

前几倩同事问我䞀䞪问题pre master key
是劂䜕生成的因䞺我圓时对https原理䞍倪了解所以我花莹了埈倚时闎查询了埈倚的资料了解了https创建铟接的过皋。我圚看到埈倚的眑页对于pre
master key 的是劂䜕生成的并没有做出解释。我浏览到这䞪眑页
https://security.stackexchange.com/questions/63971/how-is-the-premaster-secret-used-in-tls-generated
.该眑站有䞀䞪回答䞀䞪是回答是2䞪字笊是版本号剩䞋的46䞪字笊是随机倌。及倖䞀䞪回答诎是䜿甚了RSA或者DH算法。这䞪䞀䞪回答郜是盞反的。然后我又查询到了
https://tools.ietf.org/html/rfc5246#section-7.4.7.1。䞊面的解释借向于第䞀䞪回答。所以我跟同事的解释是
pre master key 是系统䜿甚随机倌生成噚生成的。同事诎pre master key 的倌是䜿甚 random_C 和 random_S
生成的我们䞀䞪谁也诎服䞍了谁。所以过来请教䞀䞋䞓䞚人士。到底 pre master key 是劂䜕生成。
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
PhistucK
2018-11-08 08:27:28 UTC
Permalink
Post by b***@gmail.com
Both of these answers are the opposite.
Not really, one is for RSA and the other is for DH and similar, as the
answer notes.

I reckon this function generated the premaster key (look for what is going
on with the pms variable) -
https://cs.chromium.org/chromium/src/third_party/boringssl/src/ssl/handshake_client.cc?type=cs&sq=package:chromium&g=0&l=1353

☆*PhistucK*
Post by b***@gmail.com
A few days ago, my colleague asked me a question about how the pre master
key was generated, because I didn't know much about the https principle at
the time, so I spent a lot of time querying a lot of information and
understanding the process of https creating links. I'm seeing how many
pages are generated for the pre master key and I haven't explained it. I am
browsing this page
https://security.stackexchange.com/questions/63971/how-is-the-premaster-secret-used-in-tls-generated.
The site has two answers, one is 2 The character is the version number and
the remaining 46 characters are random values. Another answer is to use the
RSA or DH algorithm. Both of these answers are the opposite. Then I queried
https://tools.ietf.org/html/rfc5246#section-7.4.7.1. The above
explanation tends to the first answer. So my colleague's explanation is
that the pre master key is generated by the system using a random value
generator. Colleagues say that the value of pre master key is generated
using random_C and random_S, and neither of us can convince anyone. So come
over and ask a professional. How is the pre master key generated?
I am using this document translated by Google. Chinese original text is as
前几倩同事问我䞀䞪问题pre master key
是劂䜕生成的因䞺我圓时对https原理䞍倪了解所以我花莹了埈倚时闎查询了埈倚的资料了解了https创建铟接的过皋。我圚看到埈倚的眑页对于pre
master key 的是劂䜕生成的并没有做出解释。我浏览到这䞪眑页
https://security.stackexchange.com/questions/63971/how-is-the-premaster-secret-used-in-tls-generated
.该眑站有䞀䞪回答䞀䞪是回答是2䞪字笊是版本号剩䞋的46䞪字笊是随机倌。及倖䞀䞪回答诎是䜿甚了RSA或者DH算法。这䞪䞀䞪回答郜是盞反的。然后我又查询到了
https://tools.ietf.org/html/rfc5246#section-7.4.7.1。䞊面的解释借向于第䞀䞪回答。所以我跟同事的解释是
pre master key 是系统䜿甚随机倌生成噚生成的。同事诎pre master key 的倌是䜿甚 random_C 和 random_S
生成的我们䞀䞪谁也诎服䞍了谁。所以过来请教䞀䞋䞓䞚人士。到底 pre master key 是劂䜕生成。
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups
"Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...