Which BoringSSL connections and signatures rely on RSA and elliptic-curve keys today
For a security assessor, the short answer is this: in BoringSSL, TLS key exchange, certificate signatures and TLS handshake signatures depend on public-key algorithms, specifically X25519, P-256, P-384, P-521, RSA and Ed25519. The main branch, as read on 2026-12-03, adds X25519MLKEM768 as the default first key share, which is a hybrid post-quantum key exchange that still carries X25519 alongside it. BoringSSL is open source but is not intended for general use, and its README and PORTING.md state that it has no guarantees of API or ABI stability. The answer below therefore describes the library code on the main branch, not a supported product release, and the version your team has embedded may differ.
The teams that need to care most are those that embed BoringSSL directly in their own software, and those that run Chromium-family clients or Android, where BoringSSL is the SSL library. Confirm which BoringSSL revision each product ships, because a browser or operating system build may carry an older or newer snapshot than main. Check how the signature preference lists are set in your build: in ssl_privkey.cc, RSA PKCS#1 v1.5 with SHA-256 through SHA-512 and the SHA-1 variants are allowed only in TLS 1.2, while RSA-PSS and ECDSA with P-256, P-384 and P-521, and Ed25519, are allowed in both TLS 1.2 and TLS 1.3.
The group list in ssl_key_share.cc shows the default supported groups on main as X25519MLKEM768, X25519, P-256 and P-384, with P-521 and MLKEM1024 also present in the named groups table. The default is not the same as what a given client or server negotiates, because the group and signature lists can be changed through SSL_CTX_set1_group_ids, SSL_CTX_set1_groups_list, SSL_CTX_set_signing_algorithm_prefs and SSL_CTX_set_verify_algorithm_prefs. Ask the engineering team which of these calls their configuration makes, and record the resulting lists rather than the library defaults. The same applies to certificates: the sources listed on this page do not say which certificate types a given Chromium or Android release accepts for its own verification path, so confirm that with the product owner.
For the inventory, treat the post-quantum hybrid as an addition to classical key exchange, not a replacement for it. Chromium's March 2024 intent to ship noted that Kyber key shares are sent in the first ClientHello regardless of server support, and were about 35 times larger than an X25519 key share, so record the message size effect on your own traffic before you change any default. The sources listed here do not show whether ML-DSA support in libssl is enabled by default, so confirm that with the vendor before counting ML-DSA signatures as in use.
Where each BoringSSL public-key dependency applies, by TLS version and component
Each row names one public-key dependency in BoringSSL, the TLS versions where the source code allows it, whether it is classical or post-quantum, and whether it is on by default. Read the cells alongside the source column, since some rows rest on code that the sources describe as subject to change. The main takeaway is that TLS 1.3 negotiation is the only place the post-quantum key exchange and ML-DSA signature identifiers appear in these sources.
| Dependency | TLS versions and default status | Classical or post-quantum | Source and read date |
|---|---|---|---|
| X25519 key exchange | TLS 1.3 and TLS 1.2; on by default in the main branch as read | Classical | ssl_key_share.cc, read 2026-12-03 |
| P-256 and P-384 key exchange | TLS 1.3 and TLS 1.2; on by default in the main branch as read | Classical | ssl_key_share.cc, read 2026-12-03 |
| X25519MLKEM768 key exchange | TLS 1.3 only; on by default in the main branch as read, sent as one initial share | Post-quantum hybrid | extensions.cc and ssl_key_share.cc, read 2026-12-03 |
| MLKEM1024 key exchange | TLS 1.3 only; not in the default group list as read, so the sources do not confirm it is enabled | Post-quantum | ssl_key_share.cc and extensions.cc, read 2026-12-03 |
| RSA PKCS#1 v1.5 signatures | TLS 1.2 only for SHA-256, SHA-384 and SHA-512; the SHA-256 legacy variant is off by default and only for client certificates | Classical | ssl_privkey.cc and ssl.h, read 2026-12-03 |
| RSA-PSS signatures | TLS 1.2 and TLS 1.3 for SHA-256, SHA-384 and SHA-512; the sources give a PSS salt length of the digest length as the recommended setting | Classical | ssl_privkey.cc and rsa.h, read 2026-12-03 |
| ECDSA and Ed25519 signatures | TLS 1.2 and TLS 1.3 for P-256/SHA-256, P-384/SHA-384, P-521/SHA-512 and Ed25519 | Classical | ssl_privkey.cc and curve25519.h, read 2026-12-03 |
| ML-DSA signature identifiers (44, 65, 87) | TLS 1.3 only per the signature table; the default status is not stated in the sources, so confirm before relying on it | Post-quantum | ssl.h and ssl_privkey.cc, read 2026-12-03; commit dated 2026-04-15 |
Which BoringSSL components use RSA, Diffie-Hellman or elliptic-curve keys
BoringSSL uses RSA, elliptic-curve and X25519 keys in several distinct places: key exchange, handshake signatures, certificate verification and the raw key APIs that applications call directly. The cards below separate these uses so an assessor can check each one. The sources listed on this page do not name Diffie-Hellman groups for BoringSSL, so whether FFDHE groups are offered needs to be confirmed with the project.
Key exchange groups
The TLS key exchange uses X25519, P-256 and P-384 by default, with X25519MLKEM768 listed first on the main branch read on 2026-12-03. P-521 and MLKEM1024 appear in the named groups table. Applications set the list with SSL_CTX_set1_groups_list, which accepts colon-separated group names. Check which groups your build offers, since the default list can differ from the one your deployment expects.
Key share sourceCertificate and handshake signatures
Handshake and certificate signatures use RSA-PSS, ECDSA and Ed25519 in TLS 1.3. RSA PKCS#1 v1.5 with SHA-256, SHA-384 and SHA-512 is limited to TLS 1.2, and the SHA-1 variants are also TLS 1.2 only. The signature preference list is set with SSL_CTX_set_signing_algorithm_prefs. Review that list to see which signature algorithms a server will actually use for its private key.
Signature table sourceCertificate verification callbacks
Peer certificate checks run through SSL_CTX_set_custom_verify when an application supplies its own callback. PORTING.md states that applications using CRYPTO_BUFFER APIs must implement their own verification this way. Any RSA or elliptic-curve checks inside that callback belong to the application, not to BoringSSL. Confirm which verification path your code takes before you rely on the library defaults.
Porting notesRaw RSA, X25519 and Ed25519 APIs
The headers rsa.h and curve25519.h expose RSA, X25519 and Ed25519 primitives directly to callers. rsa.h sets OPENSSL_RSA_MAX_MODULUS_BITS to 16384 and states that applications should impose their own key size limits, with no minimum modulus size. RSA_generate_key_fips accepts only 2048, 3072 and 4096 bits with exponent 65537. Callers using these APIs carry the key size and validation decisions themselves.
RSA headerPrivate key offload through SSL_PRIVATE_KEY_METHOD
SSL_PRIVATE_KEY_METHOD is the documented way to use keys held in hardware or on another machine. The key stays outside BoringSSL, so the signing algorithms that the remote key supports determine what the handshake can use. Check the offload module's list of supported RSA and elliptic-curve algorithms against the signature table before deployment.
Porting notesHow the answer changes for Chromium, Android and self-built BoringSSL
Chromium-family browsers ship BoringSSL as their TLS library, and their post-quantum behavior has changed across releases. The sources list Chrome 124 as the release that enabled the Kyber draft hybrid key exchange by default for TLS 1.3 and QUIC on desktop platforms. Chrome 131 then changed the hybrid codepoint and dropped hybrid Kyber, so the key share now uses the ML-KEM768 plus X25519 codepoint. The sources also describe a later change that removes a temporary enterprise policy, which lets administrators turn the feature off.
- Chrome 124 and later: the Kyber draft hybrid key exchange is on by default for TLS 1.3 and QUIC on desktop platforms, according to Google's May 2024 post.
- Chrome 131 codepoint change: the hybrid codepoint moves from 0x6399 (Kyber) to 0x11EC (ML-KEM768 plus X25519), and hybrid Kyber is no longer supported.
- Enterprise policy removal: a Chromium change uploaded on 2026-02-20 removes the temporary PostQuantumKeyAgreementEnabled enterprise policy, which the change said was to be removed after Chrome 145.
- Initial key share size: a March 2024 Chromium intent says Kyber key shares are sent in the first ClientHello regardless of server support and are around 35 times larger than an X25519 key share.
- Authentication not covered: the Chromium post-quantum authentication roadmap dated 2026-02-27 describes work on Merkle Tree Certificates and ML-DSA TLS keys but gives no target dates.
Check the browser version and the policy settings on each managed fleet before you record a post-quantum status for Chromium-family clients.
Android uses BoringSSL as its SSL library, but the sources give a different timeline for it than for desktop Chrome. Google's May 2024 post says the Kyber draft hybrid key exchange had not yet launched on Android when Chrome 124 turned it on for desktop platforms. The sources on this page do not say when, or whether, the same key exchange reached Android devices after that date, so the Android status has to be confirmed separately from the desktop status.
- Launch status as of May 2024: Kyber had not launched on Android at the time of the May 2024 Chrome post.
- Desktop versus Android: the Chrome 124 default applies to desktop platforms in the source, so do not carry that setting over to Android devices.
- Later Android status: the sources on this page do not say whether Android has since enabled ML-KEM or any other post-quantum key exchange.
- Operating system version: the BoringSSL build inside an Android image depends on the Android release and the Chromium WebView or system library in use, so record both.
- Certificate and signature paths: the sources on this page do not describe Android's certificate verification or handshake signing behavior.
Ask the device vendor or Android platform release notes for the exact post-quantum key exchange status of each Android version in your fleet, and record the version with each answer.
A self-built or embedded BoringSSL uses the library's own defaults unless the application changes them. The README says BoringSSL is not intended for general use, discourages third parties from depending on it, and has no guarantees of API or ABI stability. That means the default group list and the signature table in the code you build are the settings that count, not the settings in any product that ships Chromium. Check the source commit you build, because the defaults change between revisions.
- Default group list: on the main branch as read on 2026-12-03, the default supported groups are X25519MLKEM768, X25519, P-256 and P-384, in that order.
- Post-quantum classification: the TLS code treats only X25519MLKEM768 (0x11ec) and MLKEM1024 (0x0202) as post-quantum groups, and it does not negotiate them below TLS 1.3.
- TLS 1.2 signature table: RSA PKCS#1 v1.5 with SHA-256, SHA-384 and SHA-512, and the SHA-1 variants of RSA PKCS#1 and ECDSA, are allowed in TLS 1.2 only, while RSA-PSS and ECDSA on P-256, P-384 and P-521 are allowed in both TLS 1.2 and TLS 1.3.
- Legacy certificate signing: SSL_SIGN_RSA_PKCS1_SHA256_LEGACY is disabled by default and defined only for client certificates.
- Renegotiation: BoringSSL rejects peer renegotiation by default, and SSL_set_renegotiate_mode must be set to enable it.
Record the exact commit hash and the configured group and signature preference lists of the build you are reviewing, and confirm them against the source before you rely on this tab.
Some federal contracts cite CNSA 2.0 as a requirement, and the sources on this page do not say how BoringSSL maps to CNSA 2.0. The mldsa.h header advises using ML-DSA-65 unless you are specifically trying to achieve CNSA 2.0 compliance, and it describes ML-DSA-87 as excessively and unnecessarily large. That comment is the library's own wording and does not establish whether a given build meets the requirement.
- ML-DSA parameter sets: BoringSSL implements ML-DSA-44, ML-DSA-65 and ML-DSA-87, and the libssl table lists SSL_SIGN_ML_DSA_87 (0x0906) alongside the other two.
- TLS 1.3 only: the ssl_privkey.cc table marks the ML-DSA signature values as TLS 1.3 only.
- Libssl support status: a BoringSSL commit titled "Support ML-DSA in libssl" is dated 2026-04-15, and its page does not state whether that support is on by default.
- FIPS validation: BoringSSL as a whole is not FIPS validated, and the FIPS.md file does not state whether ML-KEM, ML-DSA or SLH-DSA are in any validation.
Ask the contracting officer or the contract's security annex which CNSA 2.0 parameter sets and protocol settings the contract requires, then confirm each one against your own build.
Steps to confirm which key dependencies a BoringSSL build uses
This sequence establishes which key exchange groups, signature algorithms, protocol versions and handshake settings a specific BoringSSL build actually negotiates, so that RSA and elliptic-curve dependencies are recorded from observed behavior rather than from defaults in the source tree. Each step produces a dated record that an assessor can check against the build in use.
Pin the exact BoringSSL commit or Chromium release
Record the BoringSSL commit hash or the Chromium release that embeds it, along with the date the build was made. BoringSSL has no stable API or ABI and the project says it is not intended for general use, so defaults can change between commits, and a finding is only valid for the exact revision it was made on. The step is closed when the commit or release identifier and build date are written into the inventory record and match the binary or library that will be tested.
List enabled groups and signature algorithms
Use SSL_CTX_set1_groups_list and SSL_CTX_set_signing_algorithm_prefs in a test harness, or read the values the build reports, to capture the key exchange groups and signature algorithms the context will offer. Groups are colon-separated names such as X25519 or P-256, and the default list on the main branch as read on 2026-12-03 begins with X25519MLKEM768, followed by X25519, P-256 and P-384. The step is closed when the captured lists are saved with the build identifier from the previous step.
Record the minimum and maximum protocol versions
Call SSL_CTX_set_min_proto_version and SSL_CTX_set_max_proto_version, or read their configured values, and record the range. A value of zero selects the default, and the header comment gives TLS 1.2 as the default minimum. Note that the cipher list functions do not affect TLS 1.3, so the RSA and ECDSA signature rules that apply differ by protocol version. The step is closed when the minimum and maximum versions are recorded for each context type the deployment uses.
Check legacy RSA client certificate signing
Confirm whether SSL_SIGN_RSA_PKCS1_SHA256_LEGACY is enabled in the signature preference list used for client certificates. The header documents it as disabled by default and defined only for client certificates, so the check should look for it explicitly in the preference list rather than assume it is absent. The step is closed when the result, enabled or disabled, is recorded alongside the list captured earlier, and any client that depends on the legacy algorithm is noted for follow-up.
Check whether hardware keys use private key method
Determine whether any TLS private keys are held in hardware, in a key management service or on another machine, and whether SSL_PRIVATE_KEY_METHOD is used to sign with them. The project's porting guidance names this as the recommended way to use such keys. The step is closed when each key location is listed as either held by the process or reached through SSL_PRIVATE_KEY_METHOD, so that the signing operations that depend on RSA or elliptic-curve keys can be traced to their actual location.
Confirm the renegotiation mode
Verify whether peer renegotiation is rejected or enabled. The porting guidance says BoringSSL rejects peer renegotiations by default and that SSL_set_renegotiate_mode must be set to enable them. Confirm the setting on each connection object that the deployment creates, because the value is set per connection. The step is closed when the renegotiation mode is recorded for each connection type, and any connection that allows renegotiation is marked for review since it repeats the handshake signing operations.
Capture a handshake to confirm negotiated groups
Run a test handshake against the build and capture the ClientHello and ServerHello with a packet capture or a protocol debug log. The captured messages show which key share group and signature algorithm were actually negotiated, which can differ from the configured list when a peer offers fewer options. Compare the result with the lists recorded in earlier steps. The step is closed when the captured handshake, the negotiated group and the negotiated signature algorithm are saved against the build identifier for the assessment record.
What the BoringSSL sources do not publish on RSA and elliptic-curve replacement
The BoringSSL sources document which public-key algorithms are in use and which post-quantum building blocks exist, but they leave several decisions unstated. The cards below list each gap and the question to put to the vendor or project maintainers before relying on a replacement plan.
Default state of ML-DSA in libssl
A commit titled "Support ML-DSA in libssl" carries an author date of 2026-04-15, and the signature table marks the ML-DSA identifiers as TLS 1.3 only. The commit page does not say whether this support is enabled by default. Ask the maintainers whether ML-DSA signatures are on in a default build and, if they are not, which build flag or application call turns them on. Then test a handshake in your own environment to confirm the result.
ML-DSA commitPost-quantum algorithms in FIPS validations
The FIPS.md file says BoringSSL as a whole is not FIPS validated and that the BoringCrypto core library has been validated. It names pairwise consistency self-tests for ML-KEM, ML-DSA and SLH-DSA, but it does not state whether any of these algorithms appear inside a validation. Ask the vendor which validation certificates, if any, cover ML-KEM, ML-DSA or SLH-DSA, and which module version each one covers. Treat the self-tests as a separate item from validation.
BoringSSL FIPS.mdTimeline for post-quantum authentication
The Chromium post-quantum authentication roadmap dated 2026-02-27 describes work on Merkle Tree Certificates and ML-DSA TLS keys. It gives no target dates for either. Ask the Chromium and BoringSSL teams for a target release or milestone for post-quantum certificates and signatures in TLS, and ask whether those targets apply to BoringSSL consumers outside Chrome. Plan around the absence of a date until one is published in writing.
Chromium PQ auth roadmapFuture limits on RSA key sizes
The rsa.h header defines a maximum modulus of 16384 bits and warns that very large keys can be a denial-of-service risk. It also says BoringSSL may limit overly large RSA keys in the future, with application opt-in, and it states no minimum modulus size. The sources do not say what those future limits would be or when they would apply. Ask the maintainers for the planned minimum and maximum sizes, and whether your application should set its own limits now.
BoringSSL rsa.hOwnership and support commitments
The README calls BoringSSL a Google project and says it was designed to meet Google's needs. It does not contain an explicit ownership statement, and it says there are no guarantees of API or ABI stability and that third parties should not depend on it. Ask the vendor who owns and maintains the library, what support commitment exists for external users, and whether any security fix schedule applies. Record the answer in your vendor-risk file.
BoringSSL READMEWhat can go wrong when RSA and elliptic-curve paths are left in place
Leaving RSA and elliptic-curve paths in place mostly risks surprises in the network rather than an outright failure. In BoringSSL, a post-quantum hybrid key share is considerably larger than a classical one. The March 2024 Chromium intent to ship says a Kyber key share is around 35 times larger than an X25519 key share and is sent in the first ClientHello regardless of whether the server supports it. Middleboxes, load balancers and peers that assume small ClientHello messages may drop, truncate or mishandle these connections. Before turning on any hybrid group in an environment with inspection devices or older peers, confirm how each one handles a larger first handshake message, and test that path before relying on it.
Negotiation is the second risk. The main-branch TLS code excludes post-quantum groups from negotiation below TLS 1.3, so a client or server limited to TLS 1.2 will fall back to classical groups such as X25519, P-256 or P-384. A connection can therefore succeed while using only classical key exchange, and nothing in the application will report that. The default supported-groups list also starts with X25519MLKEM768, but the protocol version range and group list interact, so a site that sets a maximum version of TLS 1.2 should not expect post-quantum key exchange. Check the negotiated group in handshake logs, not only the configured list.
Cipher configuration is a third source of confusion. The default cipher list is "ALL", and functions such as SSL_CTX_set_cipher_list and SSL_CTX_set_strict_cipher_list do not affect TLS 1.3, which is configured through a separate set of functions. An administrator who tightens the TLS 1.2 cipher list may assume the whole stack is restricted. Separately, BoringSSL's rsa.h defines a maximum modulus of 16384 bits and warns that RSA-16384 is extremely slow and may be a denial-of-service risk. The header says applications should impose their own key-size limits before importing RSA keys, and that BoringSSL has no minimum modulus size. Set those limits in the application, and record them as part of the inventory.
Questions security assessors ask about BoringSSL RSA and elliptic-curve dependencies
Is BoringSSL quantum safe?
The sources do not support calling BoringSSL quantum safe as a product. Its README describes it as open source but not intended for general use, and says third parties should not depend on it. Its headers show post-quantum building blocks in the main branch: ML-KEM (FIPS 203) with ML-KEM-768 and ML-KEM-1024, ML-DSA (FIPS 204), and SLH-DSA (FIPS 205) parameter sets. Their presence does not mean every connection or signature uses them. Default TLS settings on the main branch include a hybrid X25519MLKEM768 key exchange, but RSA and elliptic-curve keys still carry certificates and signatures. Confirm the exact configuration and build you run before drawing any conclusion.
Which BoringSSL version should we use for post-quantum settings?
The sources on this page name only the main branch and Chromium releases, so a fixed BoringSSL version with these settings is not identified here. The main branch as read on 2026-12-03 sets the default supported groups to X25519MLKEM768, X25519, P-256 and P-384, and TLS code treats only X25519MLKEM768 and MLKEM1024 as post-quantum groups. Chrome 124 enabled Kyber hybrid key exchange by default on desktop, and Chrome 131 moved the hybrid codepoint to 0x11EC. Chromium's roadmap gives no target dates for post-quantum authentication. Because BoringSSL has no stable API or ABI, pin the exact commit or Chromium build you test, and confirm with the project which release carries each feature.
Does using BoringSSL post-quantum features cost extra?
The sources on this page give no price, fee or effort figure for BoringSSL, and none for its post-quantum features. Costs usually come from the engineering time to adopt an unstable library, rebuild and retest your own software, and keep pace with changes, since the project states no API or ABI stability. Ask the team that owns your build how much rework each update would take, and ask any vendor that ships BoringSSL in its product what it charges for support or upgrades. Any licensing terms for your use should be confirmed in the repository's license files, which the sources on this page do not restate.
What breaks if we change the public-key settings in BoringSSL?
Changes to supported groups, signature algorithms or protocol version ranges affect which handshakes succeed. Cipher list functions such as SSL_CTX_set_cipher_list do not affect TLS 1.3, which is configured separately. Post-quantum groups are excluded from negotiation below TLS 1.3, so clients or peers limited to TLS 1.2 will not use them. The Chromium intent to ship notes that Kyber key shares are sent in the first ClientHello whether or not the server supports them, and are about 35 times larger than an X25519 key share, which can affect middleboxes and handshake sizes. The SSL_SIGN_RSA_PKCS1_SHA256_LEGACY option is disabled by default. Test each change against your real peers before rollout.
What should we ask BoringSSL's maintainers or the vendor shipping it?
Ask which release, commit or Chromium version carries each post-quantum feature you plan to use, and whether it is on by default. Ask whether ML-KEM, ML-DSA or SLH-DSA are part of any FIPS validation, since the FIPS.md page names only pairwise consistency self-tests for them and states that BoringSSL as a whole is not FIPS validated. Ask whether the ML-DSA libssl support from the 2026-04-15 commit is enabled by default, and what the timeline is for post-quantum authentication, which the roadmap dated 2026-02-27 does not date. If a vendor ships BoringSSL, ask how it tracks upstream changes and what notice it gives before deprecations.
Can our team do BoringSSL public-key changes ourselves, or do we need outside help?
Your team can make these changes if it has engineers comfortable building C and C++ from source, reading TLS handshake code, and testing against the peers it serves. The sources warn that BoringSSL is not suitable as a system library and is not intended for general third-party use, so the work includes pinning versions and absorbing interface changes. DeployOpen can take on a fixed-scope engagement that covers planning, implementation, testing, hardening and documentation of a self-hosted deployment in your infrastructure, with scope, deliverables and timeline agreed in writing before work starts. A written scope will show whether that fits your needs.
How DeployOpen helps assess and plan BoringSSL key dependencies
DeployOpen works through BoringSSL key dependencies as a fixed-scope review: which connections, logins and signatures rely on RSA, Diffie-Hellman or elliptic-curve keys, and which stronger settings your build and configuration can use today. The output is a dated inventory and plan that your security and engineering teams can check against their own systems.
How we scope
- Agree in writing which BoringSSL version, build and product components are in scope before work starts.
- Confirm which TLS protocol versions, certificate types and key exchange groups your deployments actually use.
- Record which systems embed BoringSSL and who owns each one, so the inventory has a clear owner per component.
- Set the scope for any retainer follow-up, since ongoing support is available alongside the fixed-scope review.
How we build
- Map each public-key dependency in your configuration to the BoringSSL setting that controls it, such as group lists and signature preferences.
- Check the minimum and maximum TLS protocol version settings and confirm which cipher and signature lists apply to TLS 1.2 and TLS 1.3.
- Test how your build behaves with the default group list and with any stronger groups or signature algorithms your version offers.
- Note where the library's own documentation says behavior may change, and flag those points for your own testing.
How we hand over
- Deliver a written inventory listing each dependency, the BoringSSL component it sits in, and the version it was checked against.
- Include a plan that separates settings you can change now from settings that depend on a future BoringSSL release.
- Document the test steps and configuration evidence so your security and vendor-risk reviewers can repeat the checks.
- Record the date of each check, since the library's default groups and signature support have changed in recent releases.
How we support
- Retest the inventory after a BoringSSL upgrade, a build change or a change to your TLS configuration.
- Track vendor and project notices that affect the dependencies on your list, and report which ones need action.
- Confirm with the BoringSSL project or your build vendor any point the public documentation does not settle.
- Offer continuous testing and upgrade support as a retainer, with the scope agreed in writing.

