SSL/TLS Strong Encryption: An Introduction
As an introduction this chapter is aimed at readers who are familiar
with the Web, HTTP, and Apache, but are not security experts. It is not
intended to be a definitive guide to the SSL protocol, nor does it discuss
specific techniques for managing certificates in an organization, or the
important legal issues of patents and import and export restrictions.
Rather, it is intended to provide a common background to mod_ssl users by pulling together various concepts, definitions,
and examples as a starting point for further exploration.
Cryptographic Techniques
Understanding SSL requires an understanding of cryptographic algorithms, message digest functions (aka. one-way or hash functions), and digital signatures. These techniques are the subject of entire books (see for instance [AC96]) and provide the basis for privacy, integrity, and authentication.
Cryptographic Algorithms
Suppose Alice wants to send a message to her bank to transfer some money. Alice would like the message to be private, since it will include information such as her account number and transfer amount. One solution is to use a cryptographic algorithm, a technique that would transform her message into an encrypted form, unreadable until it is decrypted. Once in this form, the message can only be decrypted by using a secret key. Without the key the message is useless: good cryptographic algorithms make it so difficult for intruders to decode the original text that it isn't worth their effort.
There are two categories of cryptographic algorithms: conventional and public key.
- Conventional cryptography
- also known as symmetric cryptography, requires the sender and receiver to share a key: a secret piece of information that may be used to encrypt or decrypt a message. As long as this key is kept secret, nobody other than the sender or recipient can read the message. If Alice and the bank know a secret key, then they can send each other private messages. The task of sharing a key between sender and recipient before communicating, while also keeping it secret from others, can be problematic.
- Public key cryptography
- also known as asymmetric cryptography, solves the key exchange problem by defining an algorithm which uses two keys, each of which may be used to encrypt a message. If one key is used to encrypt a message then the other must be used to decrypt it. This makes it possible to receive secure messages by simply publishing one key (the public key) and keeping the other secret (the private key).
Anyone can encrypt a message using the public key, but only the owner of the private key will be able to read it. In this way, Alice can send private messages to the owner of a key-pair (the bank), by encrypting them using their public key. Only the bank will be able to decrypt them.
Message Digests
Although Alice may encrypt her message to make it private, there is still a concern that someone might modify her original message or substitute it with a different one, in order to transfer the money to themselves, for instance. One way of guaranteeing the integrity of Alice's message is for her to create a concise summary of her message and send this to the bank as well. Upon receipt of the message, the bank creates its own summary and compares it with the one Alice sent. If the summaries are the same then the message has been received intact.
A summary such as this is called a message digest, one-way function or hash function. Message digests are used to create a short, fixed-length representation of a longer, variable-length message. Digest algorithms are designed to produce a unique digest for each message. Message digests are designed to make it impractically difficult to determine the message from the digest and (in theory) impossible to find two different messages which create the same digest -- thus eliminating the possibility of substituting one message for another while maintaining the same digest.
Another challenge that Alice faces is finding a way to send the digest to the bank securely; if the digest is not sent securely, its integrity may be compromised and with it the possibility for the bank to determine the integrity of the original message. Only if the digest is sent securely can the integrity of the associated message be determined.
One way to send the digest securely is to include it in a digital signature.
Digital Signatures
When Alice sends a message to the bank, the bank needs to ensure that the message is really from her, so an intruder cannot request a transaction involving her account. A digital signature, created by Alice and included with the message, serves this purpose.
Digital signatures are created by encrypting a digest of the message and other information (such as a sequence number) with the sender's private key. Though anyone can decrypt the signature using the public key, only the sender knows the private key. This means that only the sender can have signed the message. Including the digest in the signature means the signature is only good for that message; it also ensures the integrity of the message since no one can change the digest and still sign it.
To guard against interception and reuse of the signature by an intruder at a later date, the signature contains a unique sequence number. This protects the bank from a fraudulent claim from Alice that she did not send the message -- only she could have signed it (non-repudiation).
Certificates
Although Alice could have sent a private message to the bank, signed it and ensured the integrity of the message, she still needs to be sure that she is really communicating with the bank. This means that she needs to be sure that the public key she is using is part of the bank's key-pair, and not an intruder's. Similarly, the bank needs to verify that the message signature really was signed by the private key that belongs to Alice.
If each party has a certificate which validates the other's identity, confirms the public key and is signed by a trusted agency, then both can be assured that they are communicating with whom they think they are. Such a trusted agency is called a Certificate Authority and certificates are used for authentication.
Certificate Contents
A certificate associates a public key with the real identity of an individual, server, or other entity, known as the subject. As shown in Table 1, information about the subject includes identifying information (the distinguished name) and the public key. It also includes the identification and signature of the Certificate Authority that issued the certificate and the period of time during which the certificate is valid. It may have additional information (or extensions) as well as administrative information for the Certificate Authority's use, such as a serial number.
Table 1: Certificate Information
| Subject | Distinguished Name, Public Key |
|---|---|
| Issuer | Distinguished Name, Signature |
| Period of Validity | Not Before Date, Not After Date |
| Administrative Information | Version, Serial Number |
| Extended Information | Basic Constraints, Netscape Flags, etc. |
A distinguished name is used to provide an identity in a specific context -- for instance, an individual might have a personal certificate as well as one for their identity as an employee. Distinguished names are defined by the X.509 standard [X509], which defines the fields, field names and abbreviations used to refer to the fields (see Table 2).
Table 2: Distinguished Name Information
| DN Field | Abbrev. | Description | Example |
|---|---|---|---|
| Common Name | CN | Name being certified | CN=Joe Average |
| Organization or Company | O | Name is associated with this organization |
O=Snake Oil, Ltd. |
| Organizational Unit | OU | Name is associated with this organization unit, such as a department |
OU=Research Institute |
| City/Locality | L | Name is located in this City | L=Snake City |
| State/Province | ST | Name is located in this State/Province | ST=Desert |
| Country | C | Name is located in this Country (ISO code) | C=XZ |
A Certificate Authority may define a policy specifying which
distinguished field names are optional and which are required. It
may also place requirements upon the field contents, as may users of
certificates. For example, a Netscape browser requires that the
Common Name for a certificate representing a server matches a wildcard
pattern for the domain name of that server, such
as *.snakeoil.com.
The binary format of a certificate is defined using the ASN.1 notation [ASN1] [PKCS]. This notation defines how to specify the contents and encoding rules define how this information is translated into binary form. The binary encoding of the certificate is defined using Distinguished Encoding Rules (DER), which are based on the more general Basic Encoding Rules (BER). For those transmissions which cannot handle binary, the binary form may be translated into an ASCII form by using Base64 encoding [MIME]. When placed between begin and end delimiter lines (as below), this encoded version is called a PEM ("Privacy Enhanced Mail") encoded certificate.
Example of a PEM-encoded certificate (snakeoil.crt)
-----BEGIN CERTIFICATE----- MIIC7jCCAlegAwIBAgIBATANBgkqhkiG9w0BAQQFADCBqTELMAkGA1UEBhMCWFkx FTATBgNVBAgTDFNuYWtlIERlc2VydDETMBEGA1UEBxMKU25ha2UgVG93bjEXMBUG A1UEChMOU25ha2UgT2lsLCBMdGQxHjAcBgNVBAsTFUNlcnRpZmljYXRlIEF1dGhv cml0eTEVMBMGA1UEAxMMU25ha2UgT2lsIENBMR4wHAYJKoZIhvcNAQkBFg9jYUBz bmFrZW9pbC5kb20wHhcNOTgxMDIxMDg1ODM2WhcNOTkxMDIxMDg1ODM2WjCBpzEL MAkGA1UEBhMCWFkxFTATBgNVBAgTDFNuYWtlIERlc2VydDETMBEGA1UEBxMKU25h a2UgVG93bjEXMBUGA1UEChMOU25ha2UgT2lsLCBMdGQxFzAVBgNVBAsTDldlYnNl cnZlciBUZWFtMRkwFwYDVQQDExB3d3cuc25ha2VvaWwuZG9tMR8wHQYJKoZIhvcN AQkBFhB3d3dAc25ha2VvaWwuZG9tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB gQDH9Ge/s2zcH+da+rPTx/DPRp3xGjHZ4GG6pCmvADIEtBtKBFAcZ64n+Dy7Np8b vKR+yy5DGQiijsH1D/j8HlGE+q4TZ8OFk7BNBFazHxFbYI4OKMiCxdKzdif1yfaa lWoANFlAzlSdbxeGVHoT0K+gT5w3UxwZKv2DLbCTzLZyPwIDAQABoyYwJDAPBgNV HRMECDAGAQH/AgEAMBEGCWCGSAGG+EIBAQQEAwIAQDANBgkqhkiG9w0BAQQFAAOB gQAZUIHAL4D09oE6Lv2k56Gp38OBDuILvwLg1v1KL8mQR+KFjghCrtpqaztZqcDt 2q2QoyulCgSzHbEGmi0EsdkPfg6mp0penssIFePYNI+/8u9HT4LuKMJX15hxBam7 dUHzICxBVC1lnHyYGjDuAMhe396lYAn8bCld1/L4NMGBCQ== -----END CERTIFICATE-----
Certificate Authorities
By verifying the information in a certificate request before granting the certificate, the Certificate Authority assures itself of the identity of the private key owner of a key-pair. For instance, if Alice requests a personal certificate, the Certificate Authority must first make sure that Alice really is the person the certificate request claims she is.
Certificate Chains
A Certificate Authority may also issue a certificate for another Certificate Authority. When examining a certificate, Alice may need to examine the certificate of the issuer, for each parent Certificate Authority, until reaching one which she has confidence in. She may decide to trust only certificates with a limited chain of issuers, to reduce her risk of a "bad" certificate in the chain.
Creating a Root-Level CA
As noted earlier, each certificate requires an issuer to assert the validity of the identity of the certificate subject, up to the top-level Certificate Authority (CA). This presents a problem: who can vouch for the certificate of the top-level authority, which has no issuer? In this unique case, the certificate is "self-signed", so the issuer of the certificate is the same as the subject. Browsers are preconfigured to trust well-known certificate authorities, but it is important to exercise extra care in trusting a self-signed certificate. The wide publication of a public key by the root authority reduces the risk in trusting this key -- it would be obvious if someone else publicized a key claiming to be the authority.
A number of companies, such as Thawte and VeriSign have established themselves as Certificate Authorities. These companies provide the following services:
- Verifying certificate requests
- Processing certificate requests
- Issuing and managing certificates
It is also possible to create your own Certificate Authority. Although risky in the Internet environment, it may be useful within an Intranet where the organization can easily verify the identities of individuals and servers.
Certificate Management
Establishing a Certificate Authority is a responsibility which requires a solid administrative, technical and management framework. Certificate Authorities not only issue certificates, they also manage them -- that is, they determine for how long certificates remain valid, they renew them and keep lists of certificates that were issued in the past but are no longer valid (Certificate Revocation Lists, or CRLs).
For example, if Alice is entitled to a certificate as an employee of a company but has now left that company, her certificate may need to be revoked. Because certificates are only issued after the subject's identity has been verified and can then be passed around to all those with whom the subject may communicate, it is impossible to tell from the certificate alone that it has been revoked. Therefore when examining certificates for validity it is necessary to contact the issuing Certificate Authority to check CRLs -- this is usually not an automated part of the process.
Note
If you use a Certificate Authority that browsers are not configured to trust by default, it is necessary to load the Certificate Authority certificate into the browser, enabling the browser to validate server certificates signed by that Certificate Authority. Doing so may be dangerous, since once loaded, the browser will accept all certificates signed by that Certificate Authority.
Secure Sockets Layer (SSL)
The Secure Sockets Layer protocol is a protocol layer which may be placed between a reliable connection-oriented network layer protocol (e.g. TCP/IP) and the application protocol layer (e.g. HTTP). SSL provides for secure communication between client and server by allowing mutual authentication, the use of digital signatures for integrity and encryption for privacy.
The protocol is designed to support a range of choices for specific algorithms used for cryptography, digests and signatures. This allows algorithm selection for specific servers to be made based on legal, export or other concerns and also enables the protocol to take advantage of new algorithms. Choices are negotiated between client and server when establishing a protocol session.
Table 4: Versions of the SSL protocol
| Version | Source | Description |
|---|---|---|
| SSL v2.0 | Vendor Standard (from Netscape Corp.) | First SSL protocol for which implementations exist |
| SSL v3.0 | Expired Internet Draft (from Netscape Corp.) [SSL3] | Revisions to prevent specific security attacks, add non-RSA ciphers and support for certificate chains |
| TLS v1.0 | Proposed Internet Standard (from IETF) [TLS1] | Revision of SSL 3.0 to update the MAC layer to HMAC, add block padding for block ciphers, message order standardization and more alert messages. |
| TLS v1.1 | Proposed Internet Standard (from IETF) [TLS11] | Update of TLS 1.0 to add protection against Cipher block chaining (CBC) attacks. |
| TLS v1.2 | Proposed Internet Standard (from IETF) [TLS12] | Update of TLS 1.1 deprecating MD5 as hash, and adding incompatibility to SSL so it will never negotiate the use of SSLv2. |
| TLS v1.3 | Internet Standard (from IETF) [TLS13] | Major revision of TLS 1.2 removing legacy cryptography, mandating perfect forward secrecy, and redesigning the handshake protocol for improved security and performance. |
There are a number of versions of the SSL protocol, as shown in Table 4. As noted there, one of the benefits in SSL 3.0 is that it adds support of certificate chain loading. This feature allows a server to pass a server certificate along with issuer certificates to the browser. Chain loading also permits the browser to validate the server certificate, even if Certificate Authority certificates are not installed for the intermediate issuers, since they are included in the certificate chain. SSL 3.0 is the basis for the Transport Layer Security [TLS] protocol standard, currently in development by the Internet Engineering Task Force (IETF).
Establishing a Session
The SSL session is established by following a handshake sequence between client and server, as shown in Figure 1. This sequence may vary, depending on whether the server is configured to provide a server certificate or request a client certificate. Although cases exist where additional handshake steps are required for management of cipher information, this article summarizes one common scenario. See the SSL specification for the full range of possibilities.
Note
Once an SSL session has been established, it may be reused. This avoids the performance penalty of repeating the many steps needed to start a session. To do this, the server assigns each SSL session a unique session identifier which is cached in the server and which the client can use in future connections to reduce the handshake time (until the session identifier expires from the cache of the server).

Figure 1: Simplified SSL
Handshake Sequence
The elements of the handshake sequence, as used by the client and server, are listed below:
- Negotiate the Cipher Suite to be used during data transfer
- Establish and share a session key between client and server
- Optionally authenticate the server to the client
- Optionally authenticate the client to the server
The first step, Cipher Suite Negotiation, allows the client and server to choose a Cipher Suite supported by both of them. The SSL3.0 protocol specification defines 31 Cipher Suites. A Cipher Suite is defined by the following components:
- Key Exchange Method
- Cipher for Data Transfer
- Message Digest for creating the Message Authentication Code (MAC)
These three elements are described in the sections that follow.
Key Exchange Method
The key exchange method defines how the shared secret symmetric cryptography key used for application data transfer will be agreed upon by client and server. SSL 2.0 uses RSA key exchange only, while SSL 3.0 supports a choice of key exchange algorithms including RSA key exchange (when certificates are used), and Diffie-Hellman key exchange (for exchanging keys without certificates, or without prior communication between client and server).
One variable in the choice of key exchange methods is digital signatures -- whether or not to use them, and if so, what kind of signatures to use. Signing with a private key provides protection against a man-in-the-middle-attack during the information exchange used to generating the shared key [AC96, p516].
Cipher for Data Transfer
SSL uses conventional symmetric cryptography, as described earlier, for encrypting messages in a session. There are nine choices of how to encrypt, including the option not to encrypt:
- No encryption
- Stream Ciphers
- RC4 with 40-bit keys
- RC4 with 128-bit keys
- CBC Block Ciphers
- RC2 with 40 bit key
- DES with 40 bit key
- DES with 56 bit key
- Triple-DES with 168 bit key
- Idea (128 bit key)
- Fortezza (96 bit key)
"CBC" refers to Cipher Block Chaining, which means that a portion of the previously encrypted cipher text is used in the encryption of the current block. "DES" refers to the Data Encryption Standard [AC96, ch12], which has a number of variants (including DES40 and 3DES_EDE). "Idea" is currently one of the best and cryptographically strongest algorithms available, and "RC2" is a proprietary algorithm from RSA DSI [AC96, ch13].
Digest Function
The choice of digest function determines how a digest is created from a record unit. SSL supports the following:
- No digest (Null choice)
- MD5, a 128-bit hash
- Secure Hash Algorithm (SHA-1), a 160-bit hash
The message digest is used to create a Message Authentication Code (MAC) which is encrypted with the message to verify integrity and to protect against replay attacks.
Handshake Sequence Protocol
The handshake sequence uses three protocols:
- The SSL Handshake Protocol for performing the client and server SSL session establishment.
- The SSL Change Cipher Spec Protocol for actually establishing agreement on the Cipher Suite for the session.
- The SSL Alert Protocol for conveying SSL error messages between client and server.
These protocols, as well as application protocol data, are encapsulated in the SSL Record Protocol, as shown in Figure 2. An encapsulated protocol is transferred as data by the lower layer protocol, which does not examine the data. The encapsulated protocol has no knowledge of the underlying protocol.

Figure 2: SSL Protocol Stack
The encapsulation of SSL control protocols by the record protocol means that if an active session is renegotiated the control protocols will be transmitted securely. If there was no previous session, the Null cipher suite is used, which means there will be no encryption and messages will have no integrity digests, until the session has been established.
Data Transfer
The SSL Record Protocol, shown in Figure 3, is used to transfer application and SSL Control data between the client and server, where necessary fragmenting this data into smaller units, or combining multiple higher level protocol data messages into single units. It may compress, attach digest signatures, and encrypt these units before transmitting them using the underlying reliable transport protocol (Note: currently, no major SSL implementations include support for compression).

Figure 3: SSL Record Protocol
Securing HTTP Communication
One common use of SSL is to secure Web HTTP communication between
a browser and a webserver. This does not preclude the use of
non-secured HTTP - the secure version (called HTTPS) is the same as
plain HTTP over SSL, but uses the URL scheme https
rather than http, and a different server port (by default,
port 443). This functionality is a large part of what mod_ssl provides for the Apache webserver.
References
- [AC96]
- Bruce Schneier,
Applied Cryptography
, 2nd Edition, Wiley, 1996. See https://www.schneier.com/ for various other materials by Bruce Schneier. - [ASN1]
- ITU-T Recommendation X.208,
Specification of Abstract Syntax Notation One (ASN.1)
, last updated 2008. See http://www.itu.int/ITU-T/asn1/. - [X509]
- ITU-T Recommendation X.509,
The Directory - Authentication Framework
. For references, see http://en.wikipedia.org/wiki/X.509. - [PKCS]
Public Key Cryptography Standards (PKCS)
, RSA Laboratories Technical Notes, See https://en.wikipedia.org/wiki/PKCS.- [MIME]
- N. Freed, N. Borenstein,
Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
, RFC2045. See for instance RFC 2045. - [SSL3]
- Alan O. Freier, Philip Karlton, Paul C. Kocher,
The SSL Protocol Version 3.0
, 1996. See RFC 6101. - [TLS1]
- Tim Dierks, Christopher Allen,
The TLS Protocol Version 1.0
, 1999. See RFC 2246. - [TLS11]
The TLS Protocol Version 1.1
, 2006. See RFC 4346.- [TLS12]
The TLS Protocol Version 1.2
, 2008. See RFC 5246.- [TLS13]
The Transport Layer Security (TLS) Protocol Version 1.3
, 2018. See RFC 8446.
التشفير القوي ببروتوكول SSL/TLS: مقدمة
كمقدمة، يستهدف هذا الفصل القراء الذين هم على دراية بالويب، وHTTP، وApache، ولكنهم ليسوا خبراء في مجال الأمن. وهو ليس دليلاً قاطعاً لبروتوكول SSL، ولا يناقش تقنيات محددة لإدارة الشهادات في المؤسسات، أو المسائل القانونية الهامة المتعلقة ببراءات الاختراع وقيود الاستيراد والتصدير. بل يهدف إلى توفير خلفية مشتركة لـ mod_sslالمستخدمين من خلال تجميع مفاهيم وتعريفات وأمثلة مختلفة لتكون نقطة انطلاق للمزيد من الاستكشاف.
التقنيات التشفيرية
يتطلب فهم بروتوكول SSL فهم الخوارزميات التشفيرية، ودوال ملخص الرسائل (المعروفة أيضاً باسم الدوال أحادية الاتجاه أو دوال التجزئة)، والتوقيعات الرقمية. وتعد هذه التقنيات موضوعاً لكتب بأكملها (انظر على سبيل المثال [AC96]) وتوفر الأساس للخصوصية، والسلامة، والمصادقة.
الخوارزميات التشفيرية
افترض أن أليس تريد إرسال رسالة إلى بنكها لتحويل بعض الأموال. وتود أليس أن تكون الرسالة خاصة، نظرًا لأنها ستتضمن معلومات مثل رقم حسابها ومبلغ التحويل. أحد الحلول هو استخدام خوارزمية تشفيرية، وهي تقنية من شأنها تحويل رسالتها إلى شكل مشفر غير قابل للقراءة حتى يتم فك تشفيره. وبمجرد أن تتخذ الرسالة هذا الشكل، لا يمكن فك تشفيرها إلا باستخدام مفتاح سري. وبدون المفتاح تكون الرسالة عديمة الفائدة: فالخوارزميات التشفيرية الجيدة تجعل من الصعب جداً على المتسللين فك شفرة النص الأصلي بحيث لا يستحق الأمر عناءهم.
هناك فئتان من الخوارزميات التشفيرية: التقليدية والمفتاح العام.
- التشفير التقليدي
- والمعروف أيضاً باسم التشفير المتماثل، يتطلب من المرسل والمستلم مشاركة مفتاح: وهو معلومة سرية قد تُستخدم لتشفير الرسالة أو فك تشفيرها. وطالما بقي هذا المفتاح سرياً، فلا يمكن لأحد غير المرسل أو المستلم قراءة الرسالة. إذا كانت أليس والبنك يعرفان مفتاحاً سرياً، فيمكنهما إرسال رسائل خاصة لبعضهما البعض. غير أن مهمة مشاركة المفتاح بين المرسل والمستلم قبل التواصل، مع الحفاظ على سريته عن الآخرين، يمكن أن تكون إشكالية.
- تشفير المفتاح العام
- والمعروف أيضًا باسم التشفير غير المتماثل، يحل مشكلة تبادل المفاتيح من خلال تعريف خوارزمية تستخدم مفتاحين، يمكن استخدام كل منهما لتشفير رسالة. وإذا استُخدم أحد المفتاحين لتشفير رسالة، فيجب استخدام الآخر لفك تشفيرها. وهذا يجعل من الممكن استقبال رسائل آمنة ببساطة عن طريق نشر مفتاح واحد (المفتاح العام) والاحتفاظ بالآخر سرًا (المفتاح الخاص).
يمكن لأي شخص تشفير رسالة باستخدام المفتاح العام، ولكن مالك المفتاح الخاص فقط هو من سيتمكن من قراءتها. وبهذه الطريقة، يمكن لأليس إرسال رسائل خاصة إلى مالك زوج المفاتيح (البنك)، عن طريق تشفيرها باستخدام مفتاحه العام. البنك فقط هو من سيتمكن من فك تشفيرها.
ملخصات الرسائل
على الرغم من أن أليس قد تشفر رسالتها لجعلها خاصة، إلا أنه لا يزال هناك تخوف من أن يقوم شخص ما بتعديل رسالتها الأصلية أو استبدالها برسالة أخرى، وذلك لنقل الأموال إلى نفسه على سبيل المثال. وإحدى الطرق لضمان سلامة رسالة أليس هي أن تنشئ ملخصًا وجيزًا لرسالتها وترسله إلى البنك أيضًا. وعند استلام الرسالة، ينشئ البنك ملخصه الخاص ويقارنه بالملخص الذي أرسلته أليس. وإذا كان الملخصان متطابقين، فإن الرسالة تكون قد استُلمت سليمة.
يُطلق على ملخص مثل هذا اسم ملخص الرسالة، دالة أحادية الاتجاه أو دالة التجزئة. تُستخدم ملخصات الرسائل لإنشاء تمثيل قصير وثابت الطول لرسالة أطول ومتغيرة الطول. وتُصمم خوارزميات التلخيص لإنتاج ملخص فريد لكل رسالة. وتُصمم ملخصات الرسائل لجعل تحديد الرسالة من الملخص صعبًا بدرجة غير عملية، و(من الناحية النظرية) مستحيلاً العثور على رسالتين مختلفتين تُنتجان الملخص نفسه -- مما يلغي إمكانية استبدال رسالة بأخرى مع الحفاظ على الملخص نفسه.
تحدٍّ آخر تواجهه أليس هو إيجاد طريقة لإرسال الموجز إلى البنك بأمان؛ فإذا لم يُرسَل الموجز بأمان، فقد تُنتَهك سلامته وتضيع معها إمكانية البنك لتحديد سلامة الرسالة الأصلية. ولا يمكن تحديد سلامة الرسالة المرتبطة إلا إذا أُرسِل الموجز بأمان.
وإحدى الطرق لإرسال الموجز بأمان هي تضمينه في توقيع رقمي.
التوقيعات الرقمية
عندما ترسل أليس رسالة إلى البنك، يحتاج البنك إلى التأكد من أن الرسالة صادرة منها حقًا، حتى لا يتمكن أي متسلل من طلب معاملة تتضمن حسابها. ويؤدي التوقيع الرقمي، الذي تنشئه أليس وتدرجه مع الرسالة، هذا الغرض.
تُنشَأ التوقيعات الرقمية عن طريق تشفير موجز الرسالة ومعلومات أخرى (مثل الرقم التسلسلي) باستخدام المفتاح الخاص للمرسِل. ورغم أنه يمكن لأي شخص أن يفك تشفير التوقيع باستخدام المفتاح العام، فإن المرسِل وحده هو من يعرف المفتاح الخاص. وهذا يعني أن المرسِل وحده هو من كان بإمكانه توقيع الرسالة. وتضمين الموجز في التوقيع يعني أن التوقيع صالح فقط لتلك الرسالة؛ كما أنه يضمن سلامة الرسالة نظرًا لأنه لا يمكن لأحد تغيير الموجز مع بقاء إمكانية توقيعه.
وللحماية من اعتراض التوقيع وإعادة استخدامه بواسطة متسلل في وقت لاحق، يحتوي التوقيع على رقم تسلسلي فريد. وهذا يحمي البنك من ادعاء احتيالي من أليس بأنها لم ترسل الرسالة -- إذ إنها هي الوحيدة التي كان بإمكانها توقيعها (عدم التنصل).
الشهادات
على الرغم من أنه كان بإمكان أليس إرسال رسالة خاصة إلى البنك وتوقيعها وضمان سلامة الرسالة، إلا أنها لا تزال بحاجة إلى التأكد من أنها تتواصل حقًا مع البنك. وهذا يعني أنها بحاجة إلى التأكد من أن المفتاح العام الذي تستخدمه هو جزء من زوج مفاتيح البنك، وليس لمتسلل. وبالمثل، يحتاج البنك إلى التحقق من أن توقيع الرسالة قد وُقِّع بالفعل باستخدام المفتاح الخاص الذي ينتمي إلى أليس.
إذا كان لدى كل طرف شهادة تتحقق من هوية الطرف الآخر، وتؤكد المفتاح العام وتكون موقعة من جهة موثوقة، فيمكن لكلا الطرفين التأكد من أنهما يتواصلان مع من يعتقدان أنهما يتواصلان معه. وتُسمى مثل هذه الجهة الموثوقة جهة إصدار الشهادات وتُستخدم الشهادات للمصادقة.
محتويات الشهادة
تربط الشهادة مفتاحاً عاماً بالهوية الحقيقية لفرد أو خادم أو كيان آخر، يُعرف بالموضوع. وكما هو موضح في الجدول 1, تتضمن المعلومات المتعلقة بالموضوع معلومات تعريفية (الاسم المميز) والمفتاح العام. كما تتضمن تحديد هوية وتوقيع جهة إصدار الشهادات التي أصدرت الشهادة والفترة الزمنية التي تكون خلالها الشهادة صالحة. وقد تحتوي على معلومات إضافية (أو امتدادات) بالإضافة إلى معلومات إدارية لاستخدام جهة إصدار الشهادات، مثل الرقم التسلسلي.
الجدول 1: معلومات الشهادة
| الموضوع | الاسم المميز، المفتاح العام |
|---|---|
| الجهة المصدرة | الاسم المميز، التوقيع |
| فترة الصلاحية | تاريخ «ليس قبل»، تاريخ «ليس بعد» |
| المعلومات الإدارية | الإصدار، الرقم التسلسلي |
| المعلومات الممتدة | القيود الأساسية، أعلام Netscape، إلخ. |
يُستخدم الاسم المميز لتوفير هوية في سياق محدد -- على سبيل المثال، قد يمتلك الفرد شهادة شخصية بالإضافة إلى شهادة أخرى لهويته كموظف. يُحدد معيار X.509 الأسماء المميزة [X509]، والذي يحدد الحقول وأسماء الحقول والاختصارات المستخدمة للإشارة إلى الحقول (انظر الجدول 2).
الجدول 2: معلومات الاسم المميز
| حقل DN | الاختصار | الوصف | مثال |
|---|---|---|---|
| الاسم الشائع | CN | الاسم المراد تصديقه | CN=Joe Average |
| المؤسسة أو الشركة | O | الاسم مرتبط بهذه المؤسسة |
O=Snake Oil, Ltd. |
| الوحدة التنظيمية | OU | يرتبط الاسم بـ الوحدة التنظيمية هذه، مثل القسم |
OU=Research Institute |
| المدينة/المحلية | L | يقع الاسم في هذه المدينة | L=Snake City |
| الولاية/المقاطعة | ST | يقع الاسم في هذه الولاية/المقاطعة | ST=Desert |
| البلد | C | يقع الاسم في هذا البلد (رمز ISO) | C=XZ |
يجوز لسلطة التصديق تحديد سياسة تحدد أسماء الحقول المميزة الاختيارية وتلك المطلوبة. ويمكنها أيضاً فرض متطلبات على محتويات الحقول، كما قد يفعل مستخدمو الشهادات. على سبيل المثال، يتطلب متصفح Netscape أن يطابق الاسم الشائع لشهادة تمثل خادماً نمط الحرف البديل لاسم النطاق الخاص بذلك الخادم، مثل *.snakeoil.com.
يُحدد التنسيق الثنائي للشهادة باستخدام تدوين ASN.1 [ASN1] [PKCS]. تحدد هذه الترميزات كيفية تحديد المحتويات وقواعد الترميز التي تحدد كيفية ترجمة هذه المعلومات إلى صيغة ثنائية. ويتم تحديد الترميز الثنائي للشهادة باستخدام قواعد الترميز المتميزة (DER)، والتي تعتمد على قواعد الترميز الأساسية الأكثر عمومية (BER). بالنسبة لتلك عمليات النقل التي لا يمكنها التعامل مع البيانات الثنائية، قد يتم تحويل الصيغة الثنائية إلى صيغة ASCII باستخدام ترميز Base64 [MIME]. وعند وضعها بين خطوط الفواصل في البداية والنهاية (كما هو موضح أدناه)، يُطلق على هذه النسخة المرمزة اسم شهادة مرمزة بصيغة PEM ("البريد المحسن الخصوصية").
مثال على شهادة مرمزة بصيغة PEM (snakeoil.crt)
-----BEGIN CERTIFICATE----- MIIC7jCCAlegAwIBAgIBATANBgkqhkiG9w0BAQQFADCBqTELMAkGA1UEBhMCWFkx FTATBgNVBAgTDFNuYWtlIERlc2VydDETMBEGA1UEBxMKU25ha2UgVG93bjEXMBUG A1UEChMOU25ha2UgT2lsLCBMdGQxHjAcBgNVBAsTFUNlcnRpZmljYXRlIEF1dGhv cml0eTEVMBMGA1UEAxMMU25ha2UgT2lsIENBMR4wHAYJKoZIhvcNAQkBFg9jYUBz bmFrZW9pbC5kb20wHhcNOTgxMDIxMDg1ODM2WhcNOTkxMDIxMDg1ODM2WjCBpzEL MAkGA1UEBhMCWFkxFTATBgNVBAgTDFNuYWtlIERlc2VydDETMBEGA1UEBxMKU25h a2UgVG93bjEXMBUGA1UEChMOU25ha2UgT2lsLCBMdGQxFzAVBgNVBAsTDldlYnNl cnZlciBUZWFtMRkwFwYDVQQDExB3d3cuc25ha2VvaWwuZG9tMR8wHQYJKoZIhvcN AQkBFhB3d3dAc25ha2VvaWwuZG9tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB gQDH9Ge/s2zcH+da+rPTx/DPRp3xGjHZ4GG6pCmvADIEtBtKBFAcZ64n+Dy7Np8b vKR+yy5DGQiijsH1D/j8HlGE+q4TZ8OFk7BNBFazHxFbYI4OKMiCxdKzdif1yfaa lWoANFlAzlSdbxeGVHoT0K+gT5w3UxwZKv2DLbCTzLZyPwIDAQABoyYwJDAPBgNV HRMECDAGAQH/AgEAMBEGCWCGSAGG+EIBAQQEAwIAQDANBgkqhkiG9w0BAQQFAAOB gQAZUIHAL4D09oE6Lv2k56Gp38OBDuILvwLg1v1KL8mQR+KFjghCrtpqaztZqcDt 2q2QoyulCgSzHbEGmi0EsdkPfg6mp0penssIFePYNI+/8u9HT4LuKMJX15hxBam7 dUHzICxBVC1lnHyYGjDuAMhe396lYAn8bCld1/L4NMGBCQ== -----END CERTIFICATE-----
جهات إصدار الشهادات
من خلال التحقق من المعلومات الواردة في طلب الشهادة قبل منح الشهادة، تضمن جهة إصدار الشهادات لنفسها هوية مالك المفتاح الخاص لزوج المفاتيح. على سبيل المثال، إذا طلبت أليس شهادة شخصية، يجب على جهة إصدار الشهادات أولاً التأكد من أن أليس هي بالفعل الشخص الذي يدعي طلب الشهادة أنها هي.
سلاسل الشهادات
يجوز لجهة إصدار الشهادات أيضًا إصدار شهادة لجهة إصدار شهادات أخرى. عند فحص شهادة ما، قد تحتاج أليس إلى فحص شهادة جهة الإصدار، لكل جهة إصدار شهادات أصل، حتى تصل إلى جهة تثق بها. وقد تقرر الوثوق فقط بالشهادات ذات سلسلة المصدِرين المحدودة، لتقليل مخاطر وجود شهادة "سيئة" في السلسلة.
إنشاء جهة إصدار شهادات على مستوى الجذر
كما أُشير سابقًا، تتطلب كل شهادة وجود جهة إصدار لتأكيد صحة هوية صاحب الشهادة، وصولاً إلى جهة إصدار الشهادات (CA) ذات المستوى الأعلى. وهذا يطرح مشكلة: من يمكنه كفالة شهادة السلطة ذات المستوى الأعلى، والتي ليس لها جهة إصدار؟ في هذه الحالة الفريدة، تكون الشهادة "موقعة ذاتيًا"، لذا فإن جهة إصدار الشهادة هي نفسها صاحب الشهادة. يتم تهيئة المتصفحات مسبقًا للوثوق بجهات إصدار الشهادات المعروفة، ولكن من المهم توخي الحذر الشديد عند الوثوق بشهادة موقعة ذاتيًا. يقلل النشر الواسع للمفتاح العام بواسطة السلطة الجذرية من مخاطر الوثوق بهذا المفتاح -- حيث سيكون من الواضح إذا قام شخص آخر بنشر مفتاح يدعي أنه السلطة.
عدد من الشركات، مثل Thawte و VeriSignأثبتت مكانتها كجهات إصدار شهادات. وتوفر هذه الشركات الخدمات التالية:
- التحقق من طلبات الشهادات
- معالجة طلبات الشهادات
- إصدار الشهادات وإدارتها
من الممكن أيضاً إنشاء مرجع المصدّقات الخاص بك. وعلى الرغم من أن هذا ينطوي على مخاطرة في بيئة الإنترنت، إلا أنه قد يكون مفيداً داخل شبكة الإنترانت حيث يمكن للمؤسسة التحقق بسهولة من هويات الأفراد والخوادم.
إدارة الشهادات
إن إنشاء مرجع مصدّقات هو مسؤولية تتطلب إطاراً إدارياً وفنياً وتنظيمياً متيناً. فمراجع المصدّقات لا تكتفي بإصدار الشهادات فحسب، بل تديرها أيضاً -- أي أنها تحدد المدة التي تظل فيها الشهادات صالحة، وتجددها، وتحتفظ بقوائم الشهادات التي أُصدرت في الماضي ولم تعد صالحة (قوائم إلغاء الشهادات، أو CRLs).
على سبيل المثال، إذا كانت أليس يحق لها الحصول على شهادة بصفتها موظفة في شركة ما ولكنها غادرت تلك الشركة الآن، فقد يلزم إلغاء شهادتها. ولأن الشهادات تُصدر فقط بعد التحقق من هوية صاحبها ويمكن تداولها بعد ذلك بين جميع من قد يتواصل معهم، فإنه من المستحيل معرفة ما إذا كانت الشهادة قد أُلغيت من خلال الشهادة بمفردها. لذلك، عند فحص الشهادات للتأكد من صلاحيتها، يلزم الاتصال بمرجع المصدّقات المُصدر للتحقق من قوائم إلغاء الشهادات -- وهذا عادةً ليس جزءاً مؤتمتاً من العملية.
ملاحظة
إذا استخدمت مرجع مصدّقات لم تُضبط المتصفحات للوثوق به افتراضياً، فمن الضروري تحميل شهادة مرجع المصدّقات في المتصفح، مما يتيح للمتصفح التحقق من صحة شهادات الخادم الموقعة من مرجع المصدّقات ذاك. وقد يكون القيام بذلك خطيراً، لأنه بمجرد تحميلها، سيعتمد المتصفح جميع الشهادات الموقعة من مرجع المصدّقات هذا.
طبقة المآخذ الآمنة (SSL)
إن بروتوكول طبقة المآخذ الآمنة هو طبقة بروتوكول يمكن وضعها بين بروتوكول طبقة شبكة موثوق وموجه بالاتصال (مثل TCP/IP) وطبقة بروتوكول التطبيق (مثل HTTP). يوفر بروتوكول SSL اتصالات آمنة بين العميل والخادم من خلال السماح بالمصادقة المتبادلة، واستخدام التوقيعات الرقمية للسلامة والتشفير للخصوصية.
صُمم البروتوكول لدعم مجموعة من الخيارات لخوارزميات محددة تُستخدم في التشفير، والموجزات والتوقيعات. ويسمح هذا باختيار الخوارزميات لخوادم معينة بناءً على الاعتبارات القانونية أو المتعلقة بالتصدير أو غيرها، كما يُمكّن البروتوكول من الاستفادة من الخوارزميات الجديدة. وتتم المفاوضات على الخيارات بين العميل والخادم عند إنشاء جلسة البروتوكول.
الجدول 4: إصدارات بروتوكول SSL
| الإصدار | المصدر | الوصف |
|---|---|---|
| SSL v2.0 | معيار المورد (من شركة Netscape Corp.) | أول بروتوكول SSL توجد له تطبيقات فعلية |
| SSL v3.0 | مسودة إنترنت منتهية الصلاحية (من شركة Netscape Corp.) [SSL3] | تعديلات لمنع هجمات أمنية محددة، وإضافة مشفرات غير قائمة على RSA ودعم سلاسل الشهادات |
| TLS v1.0 | معيار إنترنت مقترح (من IETF) [TLS1] | مراجعة لـ SSL 3.0 لتحديث طبقة MAC إلى HMAC، وإضافة حشو الكتل لمشفرات الكتل، وتوحيد ترتيب الرسائل، والمزيد من رسائل التنبيه. |
| TLS v1.1 | معيار إنترنت مقترح (من IETF) [TLS11] | تحديث لـ TLS 1.0 لإضافة حماية ضد هجمات ربط كتل التشفير (CBC). |
| TLS v1.2 | معيار إنترنت مقترح (من IETF) [TLS12] | تحديث لـ TLS 1.1 يستغني عن MD5 كدالة تجزئة، ويضيف عدم التوافق مع SSL بحيث لا يتفاوض مطلقًا على استخدام SSLv2. |
| TLS v1.3 | معيار إنترنت (من IETF) [TLS13] | مراجعة رئيسية لـ TLS 1.2 تزيل تقنيات التشفير القديمة، وتفرض السرية الأمامية المثالية، وتُعيد تصميم بروتوكول المصافحة لتحسين الأمان والأداء. |
توجد عدة إصدارات لبروتوكول SSL، كما هو موضح فيالجدول 4. وكما هو موضح هناك، فإن إحدى المزايا في SSL 3.0 هي أنه يضيف دعمًا لتحميل سلسلة الشهادات. وتتيح هذه الميزة للخادم تمرير شهادة الخادم جنبًا إلى جنب مع شهادات الجهات المصدرة إلى المتصفح. كما يسمح تحميل السلسلة للمتصفح بالتحقق من صحة شهادة الخادم، حتى لو لم تكن شهادات هيئة التصديق مثبتة للجهات المصدرة الوسيطة، نظرًا لتضمنها في سلسلة الشهادات. ويعد SSL 3.0 الأساس لمعيار بروتوكول أمان طبقة النقل [TLS]، الذي تعكف على تطويره حاليًا قوة مهام هندسة الإنترنت (IETF).
إنشاء جلسة
تُنشأ جلسة SSL من خلال اتباع تسلسل المصافحة بين العميل والخادم، كما هو موضح في الشكل 1. وقد يختلف هذا التسلسل، اعتمادًا على ما إذا كان الخادم مهيئًا لتقديم شهادة خادم أو طلب شهادة عميل. وعلى الرغم من وجود حالات تتطلب خطوات مصافحة إضافية لإدارة معلومات التشفير، فإن هذه المقالة تلخص سيناريو واحدًا شائعًا. انظر مواصفات SSL للاطلاع على المجموعة الكاملة من الاحتمالات.
ملاحظة
بمجرد إنشاء جلسة SSL، يمكن إعادة استخدامها. وهذا يتجنب التأثير السلبي على الأداء الناتج عن تكرار الخطوات الكثيرة اللازمة لبدء الجلسة. وللقيام بذلك، يخصص الخادم لكل جلسة SSL معرف جلسة فريدًا يتم تخزينه مؤقتًا في الخادم ويمكن للعميل استخدامه في الاتصالات المستقبلية لتقليل وقت المصافحة (حتى تنتهي صلاحية معرف الجلسة من الذاكرة المؤقتة للخادم).

الشكل 1: تسلسل مصافحة SSL المبسط
عناصر تسلسل المصافحة، كما يستخدمها العميل والخادم، مدرجة أدناه:
- التفاوض على مجموعة التشفير المستخدمة أثناء نقل البيانات
- إنشاء مفتاح جلسة ومشاركته بين العميل والخادم
- المصادقة الاختيارية للخادم لدى العميل
- المصادقة الاختيارية للعميل لدى الخادم
تتيح الخطوة الأولى، وهي التفاوض على مجموعة التشفير، للعميل والخادم اختيار مجموعة تشفير مدعومة من كليهما. تحدد مواصفات بروتوكول SSL3.0 عدد 31 مجموعة تشفير. وتُحدد مجموعة التشفير بالمكونات التالية:
- طريقة تبادل المفاتيح
- شفرة نقل البيانات
- موجز الرسالة لإنشاء رمز مصادقة الرسالة (MAC)
يتم شرح هذه العناصر الثلاثة في الأقسام التي تلي.
طريقة تبادل المفاتيح
تحدد طريقة تبادل المفاتيح كيفية الاتفاق بين العميل والخادم على مفتاح التشفير المتماثل السري المشترك المستخدم لنقل بيانات التطبيق. يستخدم SSL 2.0 تبادل مفاتيح RSA فقط، بينما يدعم SSL 3.0 خيارًا من خوارزميات تبادل المفاتيح بما في ذلك تبادل مفاتيح RSA (عند استخدام الشهادات)، وتبادل مفاتيح Diffie-Hellman (لتداول المفاتيح بدون شهادات، أو بدون اتصال مسبق بين العميل والخادم).
أحد المتغيرات في اختيار طرق تبادل المفاتيح هو التوقيعات الرقمية -- سواء جرى استخدامها أم لا، وإذا كان الأمر كذلك، فما نوع التوقيعات المستخدمة. يوفر التوقيع باستخدام مفتاح خاص حماية ضد هجوم الشخص في المنتصف أثناء تبادل المعلومات المستخدم لتوليد المفتاح المشترك [AC96، ص516].
شفرة نقل البيانات
يستخدم بروتوكول SSL التشفير المتماثل التقليدي، كما وُصف سابقًا، لتشفير الرسائل في الجلسة. هناك تسعة خيارات لكيفية التشفير، بما في ذلك خيار عدم التشفير:
- بدون تشفير
- شفيرات التدفق
- RC4 بمفاتيح 40 بت
- RC4 بمفاتيح 128 بت
- شفيرات الكتل بنمط CBC
- RC2 بمفتاح 40 بت
- DES بمفتاح 40 بت
- DES بمفتاح طوله 56 بت
- Triple-DES بمفتاح طوله 168 بت
- Idea (مفتاح طوله 128 بت)
- Fortezza (مفتاح طوله 96 بت)
يشير "CBC" إلى تسلسل كتل الشفرة (Cipher Block Chaining)، مما يعني استخدام جزء من النص المشفر السابق في تشفير الكتلة الحالية. ويشير "DES" إلى معيار تشفير البيانات (Data Encryption Standard) [AC96، الفصل 12]، والذي يضم عدداً من المتغيرات (بما في ذلك DES40 و3DES_EDE). وتُعد "Idea" حالياً واحدة من أفضل الخوارزميات وأقواها تشفيرياً، و"RC2" هي خوارزمية ملكية خاصة بـ RSA DSI [AC96، الفصل 13].
دالة الملخص
يحدد اختيار دالة الملخص كيفية إنشاء ملخص من وحدة السجل. يدعم SSL ما يلي:
- بدون ملخص (خيار Null)
- MD5، خوارزمية تجزئة بطول 128 بت
- خوارزمية التجزئة الآمنة (SHA-1)، خوارزمية تجزئة بطول 160 بت
يُستخدم ملخص الرسالة لإنشاء رمز مصادقة الرسالة (MAC) الذي يُشفَّر مع الرسالة للتحقق من السلامة وللحماية من هجمات الإعادة.
بروتوكول تسلسل المصافحة
يستخدم تسلسل المصافحة ثلاثة بروتوكولات:
- الـ بروتوكول مصافحة SSLلإجراء إنشاء جلسة SSL بين العميل والخادم.
- الـبروتوكول SSL Change Cipher Spec للتوصل بالفعل إلى اتفاق بشأن مجموعة خوارزميات التشفير للجلسة.
- إن بروتوكول تنبيه SSL لنقل رسائل أخطاء SSL بين العميل والخادم.
تُغلَّف هذه البروتوكولات، بالإضافة إلى بيانات بروتوكول التطبيق، في بروتوكول سجل SSL، كما هو موضح في الشكل 2. يُنقل البروتوكول المُغلَّف كبيانات بواسطة بروتوكول الطبقة الأدنى، والذي لا يفحص البيانات. ولا يملك البروتوكول المُغلَّف أي معرفة بالبروتوكول الأساسي.

الشكل 2: مكدس بروتوكول SSL
يعني تغليف بروتوكولات التحكم لـ SSL بواسطة بروتوكول السجل أنه إذا تم إعادة التفاوض على جلسة نشطة، فسيتم نقل بروتوكولات التحكم بأمان. وإذا لم تكن هناك جلسة سابقة، فيُستخدم طقم التشفير الفارغ (Null)، مما يعني أنه لن يكون هناك تشفير ولن تحتوي الرسائل على ملخصات السلامة، إلى أن يتم إنشاء الجلسة.
نقل البيانات
بروتوكول سجل SSL، الموضح في الشكل 3، يُستخدم لنقل بيانات التطبيق والتحكم في SSL بين العميل والخادم، مع تجزئة هذه البيانات عند الضرورة إلى وحدات أصغر، أو دمج رسائل بيانات بروتوكولات المستوى الأعلى المتعددة في وحدات مفردة. وقد يقوم بضغط هذه الوحدات، وإرفاق توقيعات الخلاصة، وتشفيرها قبل إرسالها باستخدام بروتوكول النقل الموثوق الأساسي (ملاحظة: حاليًا، لا تتضمن أي من تطبيقات SSL الرئيسية دعمًا للضغط).

الشكل 3: بروتوكول سجل SSL
تأمين اتصالات HTTP
أحد الاستخدامات الشائعة لـ SSL هو تأمين اتصالات Web HTTP بين المتصفح وخادم الويب. ولا يمنع هذا استخدام HTTP غير المؤمّن - فالإصدار المؤمّن (المسمى HTTPS) هو نفسه HTTP العادي عبر SSL، ولكنه يستخدم مخطط URL https بدلاً من http، ومنفذ خادم مختلف (افتراضيًا، المنفذ 443). وتعد هذه الوظيفة جزءًا كبيرًا مما يقدمه mod_ssl لخادم ويب Apache.
المراجع
- [AC96]
- بروس شناير،
التشفير التطبيقي
، الطبعة الثانية، وايلي، 1996. راجع https://www.schneier.com/ للاطلاع على مواد مختلفة أخرى كتبها بروس شناير. - [ASN1]
- توصية قطاع تقييس الاتصالات X.208،
مواصفة تدوين بناء الجملة المجرد الأول (ASN.1)
، أحدث تحديث في عام 2008. راجع http://www.itu.int/ITU-T/asn1/. - [X509]
- توصية قطاع تقييس الاتصالات X.509،
الدليل - إطار عمل المصادقة
. للمراجع، انظر http://en.wikipedia.org/wiki/X.509. - [PKCS]
معايير تشفير المفتاح العام (PKCS)
، الملاحظات التقنية لمختبرات RSA، انظر https://en.wikipedia.org/wiki/PKCS.- [MIME]
- N. Freed, N. Borenstein,
امتدادات بريد الإنترنت متعددة الأغراض (MIME) الجزء الأول: تنسيق ومتن رسائل الإنترنت
، RFC2045. انظر على سبيل المثال RFC 2045. - [SSL3]
- آلان أُو. فراير، فيليب كارلتون، بول سي. كوخر،
بروتوكول SSL الإصدار 3.0
، 1996. انظر RFC 6101. - [TLS1]
- تيم ديركس، كريستوفر ألين،
بروتوكول TLS الإصدار 1.0
، 1999. انظر RFC 2246. - [TLS11]
بروتوكول TLS الإصدار 1.1
، 2006. انظر RFC 4346.- [TLS12]
بروتوكول TLS الإصدار 1.2
، 2008. انظر RFC 5246.- [TLS13]
بروتوكول أمان طبقة النقل (TLS) الإصدار 1.3
، 2018. انظر RFC 8446.
Frequently asked questions · الأسئلة الشائعة
What is the primary difference between conventional cryptography and public key cryptography?ما الفرق الرئيسي بين التشفير التقليدي والتشفير بالمفتاح العام؟
Conventional (symmetric) cryptography relies on a single shared secret key between sender and recipient to encrypt and decrypt messages. In contrast, public key (asymmetric) cryptography uses a key-pair consisting of a public key to encrypt the message and a private key to decrypt it.
يعتمد التشفير التقليدي (المتماثل) على مفتاح سري واحد مشترك بين المرسل والمستقبل لتشفير الرسائل وفك تشفيرها. في المقابل، يستخدم التشفير بالمفتاح العام (غير المتماثل) زوجاً من المفاتيح يتكون من مفتاح عام لتشفير الرسالة ومفتاح خاص لفك تشفيرها.
Who is the intended target audience for this introductory guide on SSL/TLS encryption?من هي الفئة المستهدفة من هذا الدليل التمهيدي لتشفير SSL/TLS؟
This introduction is designed for readers who are already familiar with the Web, HTTP, and Apache, but are not security experts. It provides a foundational background for mod_ssl users rather than acting as an exhaustive technical guide or addressing legal issues.
يستهدف هذا التمهيد القراء المطلعين على الويب وبروتوكول HTTP وخادم Apache ممن ليسوا خبراء أمنيين، حيث يوفر خلفية أساسية لمستخدمي وحدة mod_ssl دون أن يكون دليلاً تقنياً شاملاً أو متناولاً للمسائل القانونية.
What underlying cryptographic components are required to build and verify a digital signature?ما هي المكونات التشفيرية الأساسية المطلوبة لإنشاء التوقيع الرقمي والتحقق منه؟
To create a digital signature, a sender must generate a message digest (hash) from the original message and encrypt that digest, along with information like a unique sequence number, using their private key. Verification requires the sender's public key.
لإنشاء توقيع رقمي، يجب على المرسل إنتاج ملخص للرسالة (دالة التجزئة) من الرسالة الأصلية وتشفير ذلك الملخص مع معلومات إضافية مثل رقم التسلسل الفريد باستخدام مفتاحه الخاص، بينما يتطلب التحقق استخدام المفتاح العام للمرسل.
What risk arises if a message digest is sent alongside a message without being transmitted securely?ما الخطر الأمني الناجم عن إرسال ملخص الرسالة دون تأمينه بشكل صحيح؟
If a message digest is not sent securely, its integrity can be compromised in transit. An intruder could modify both the original message and the digest, preventing the recipient from detecting unauthorized tampering or confirming message integrity.
إذا لم يتم إرسال ملخص الرسالة بأمان، فقد تتعرض سلامته للتعديل أثناء النقل؛ إذ يمكن للمخترق تعديل الرسالة الأصلية والملخص معاً، مما يمنع المستلم من اكتشاف التلاعب أو التأكد من سلامة الرسالة.
What key information fields are stored within a standard digital certificate?ما هي حقول البيانات الرئيسية المخزنة داخل الشهادة الرقمية المعتمدة؟
A digital certificate contains the Subject information (Distinguished Name and Public Key), Issuer information (DN and Signature), Period of Validity (Not Before and Not After dates), Administrative Information (Version and Serial Number), and Extended Information.
تحتوي الشهادة الرقمية على معلومات الموضوع (الاسم المتميز والمفتاح العام)، ومعلومات الجهة المصدرة (الاسم المتميز والتوقيع)، وفترة الصلاحية (تاريخ البدء والانتهاء)، والمعلومات الإدارية (الإصدار والرقم التسلسلي)، والمعلومات الممتدة.
How do message digest algorithms validate that a received message has not been altered?كيف تتحقق خوارزميات ملخص الرسائل من عدم تعديل البيانات المستلمة؟
The recipient generates their own digest of the received message and compares it to the digest provided by the sender. Because digest algorithms produce a unique fixed-length representation for distinct messages, matching digests validate that the message arrived intact.
يقوم المستلم بإنشاء ملخص خاص به للرسالة المستلمة ومقارنته بالملخص المرسل من المصدر. وبما أن خوارزميات التجزئة تنتج تمثيلاً فريداً ثابت الطول للرسائل، فإن تطابق الملخصين يثبت وصول الرسالة كاملة دون تغيير.
How does including a unique sequence number in a digital signature resolve replay risks?كيف يمنع تضمين رقم التسلسل الفريد في التوقيع الرقمي مخاطر إعادة الاستخدام؟
Including a unique sequence number within the digital signature guards against an intruder intercepting a valid signature and replaying it at a later date. It also establishes non-repudiation, preventing the sender from claiming they did not initiate the transaction.
يحمي تضمين رقم التسلسل الفريد داخل التوقيع الرقمي من اعتراض التوقيع الصحيح وإعادة استخدامه لاحقاً من قبل جهة خبيثة، كما يحقق عدم الإنكار لمنع المرسل من ادعاء عدم إرسال الطلب.
When must communicating parties rely on a Certificate Authority rather than direct key exchanges?متى يلزم الاعتماد على سلطة الشهادات (Certificate Authority) بدلاً من تبادل المفاتيح مباشرة؟
A Certificate Authority (CA) is required when parties need to verify that a public key belongs to the real identity of the intended subject (person or server). The CA acts as a trusted third party that validates identities and signs certificates to prevent key spoofing.
يلزم الاعتماد على سلطة الشهادات عند حاجة الأطراف للتحقق من أن المفتاح العام يخص الهوية الحقيقية للمستهدف (شخص أو سيرفر)، حيث تعمل كطرف ثالث موثوق يوثق الهويات ويوقع الشهادات لمنع انتحال المفاتيح.
Which fields within an X.509 Distinguished Name (DN) structure define geographic identity details?ما هي الحقول المستخدمة في حقل الاسم المتميز (DN) لتحديد البيانات الجغرافية للمنظمة؟
According to the X.509 standard DN specification, geographic details are captured using specific abbreviations: Locality or City (L), State or Province (ST), and Country (C), alongside organizational information like Organization (O) and Common Name (CN).
وفقاً لمعيار X.509، تُحدد البيانات الجغرافية باستخدام اختصارات محددة: المدينة/الموقع (L)، الولاية/المقاطعة (ST)، والدولة (C)، وذلك إلى جانب اسم المنظمة (O) والاسم الشائع (CN).
What administrative and operational topics fall outside this introduction and require separate exploration?ما هي الموضوعات التشغيلية والقانونية التي تخرج عن نطاق هذه المقدمة وتتطلب دراسة مستقلة؟
Operational techniques for managing certificates within an enterprise context, as well as complex legal issues regarding cryptography patents, export restrictions, and import regulations, are beyond this introductory text and require separate specialized study.
تخرج التقنيات التشغيلية لإدارة الشهادات داخل المنشآت، بالإضافة إلى المسائل القانونية المتعلقة ببراءات اختراع التشفير وقيود الاستيراد والتصدير، عن نطاق هذه المقدمة وتتطلب بحثاً متخصصاً مستقلاً.
Related reading
Knowledge base
SSL/TLS Strong Encryption: How-ToKnowledge base
Log FilesKnowledge base
Getting StartedArticle
SSL Certificate Saudi Arabia for Website Security, Trust, and HTTPS ProtectionSSL certificates in Saudi Arabia strengthen encryption, website trust, safer transactions, SEO performance, and digital credibility for online growth.
Article
Website Migration to a KSA Data Center: The Zero-Downtime Technical Playbook (GCC & MENA)Migrate to a KSA data center with zero downtime: staging checks, DNS TTL plan, DB sync, SSL, email, SEO safety, rollback, monitoring. Saudi, GCC MENA.