prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Incorrect docstrings in x25519 and x448 `.public_key()` methods
  See:
  
  https://github.com/pyca/cryptography/blob/127a2860740c77f45362e68e0ed7d2d108a39033/src/cryptography/hazmat/primitives/asymmetric/x25519.py#L60-L64
  
  https://github.com/pyca/cryptography/blob/127a2860740c77f45362e68e0ed7d2d108a39033/src/cryptography/hazmat/primitives/asymmetric/x448.py#L60-L64
  
  In both instances, the method does not return serialised bytes, but a public key object. The full [generated documentation](https://cryptography.io/en/latest/hazmat/primitives/asymmetric/x25519/#cryptography.hazmat.primitives.asymmetric.x25519.X25519PrivateKey.public_key) is correct, as are the Ed* docstrings.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/cryptography/hazmat/primitives/asymmetric/x448.py`
  Content:
  ```
  1 # This file is dual licensed under the terms of the Apache License, Version
  2 # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  3 # for complete details.
  4 
  5 
  6 import abc
  7 
  8 from cryptography.exceptions import UnsupportedAlgorithm, _Reasons
  9 from cryptography.hazmat.primitives import _serialization
  10 
  11 
  12 class X448PublicKey(metaclass=abc.ABCMeta):
  13     @classmethod
  14     def from_public_bytes(cls, data: bytes) -> "X448PublicKey":
  15         from cryptography.hazmat.backends.openssl.backend import backend
  16 
  17         if not backend.x448_supported():
  18             raise UnsupportedAlgorithm(
  19                 "X448 is not supported by this version of OpenSSL.",
  20                 _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,
  21             )
  22 
  23         return backend.x448_load_public_bytes(data)
  24 
  25     @abc.abstractmethod
  26     def public_bytes(
  27         self,
  28         encoding: _serialization.Encoding,
  29         format: _serialization.PublicFormat,
  30     ) -> bytes:
  31         """
  32         The serialized bytes of the public key.
  33         """
  34 
  35 
  36 class X448PrivateKey(metaclass=abc.ABCMeta):
  37     @classmethod
  38     def generate(cls) -> "X448PrivateKey":
  39         from cryptography.hazmat.backends.openssl.backend import backend
  40 
  41         if not backend.x448_supported():
  42             raise UnsupportedAlgorithm(
  43                 "X448 is not supported by this version of OpenSSL.",
  44                 _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,
  45             )
  46         return backend.x448_generate_key()
  47 
  48     @classmethod
  49     def from_private_bytes(cls, data: bytes) -> "X448PrivateKey":
  50         from cryptography.hazmat.backends.openssl.backend import backend
  51 
  52         if not backend.x448_supported():
  53             raise UnsupportedAlgorithm(
  54                 "X448 is not supported by this version of OpenSSL.",
  55                 _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,
  56             )
  57 
  58         return backend.x448_load_private_bytes(data)
  59 
  60     @abc.abstractmethod
  61     def public_key(self) -> X448PublicKey:
  62         """
  63         The serialized bytes of the public key.
  64         """
  65 
  66     @abc.abstractmethod
  67     def private_bytes(
  68         self,
  69         encoding: _serialization.Encoding,
  70         format: _serialization.PrivateFormat,
  71         encryption_algorithm: _serialization.KeySerializationEncryption,
  72     ) -> bytes:
  73         """
  74         The serialized bytes of the private key.
  75         """
  76 
  77     @abc.abstractmethod
  78     def exchange(self, peer_public_key: X448PublicKey) -> bytes:
  79         """
  80         Performs a key exchange operation using the provided peer's public key.
  81         """
  82
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/src/cryptography/hazmat/primitives/asymmetric/x448.py b/src/cryptography/hazmat/primitives/asymmetric/x448.py
  --- a/src/cryptography/hazmat/primitives/asymmetric/x448.py
  +++ b/src/cryptography/hazmat/primitives/asymmetric/x448.py
  @@ -60,7 +60,7 @@
       @abc.abstractmethod
       def public_key(self) -> X448PublicKey:
           """
  -        The serialized bytes of the public key.
  +        Returns the public key associated with this private key
           """
   
       @abc.abstractmethod
  
verification_info: {"golden_diff": "diff --git a/src/cryptography/hazmat/primitives/asymmetric/x448.py b/src/cryptography/hazmat/primitives/asymmetric/x448.py\n--- a/src/cryptography/hazmat/primitives/asymmetric/x448.py\n+++ b/src/cryptography/hazmat/primitives/asymmetric/x448.py\n@@ -60,7 +60,7 @@\n     @abc.abstractmethod\n     def public_key(self) -> X448PublicKey:\n         \"\"\"\n-        The serialized bytes of the public key.\n+        Returns the public key associated with this private key\n         \"\"\"\n \n     @abc.abstractmethod\n", "issue": "Incorrect docstrings in x25519 and x448 `.public_key()` methods\nSee:\r\n\r\nhttps://github.com/pyca/cryptography/blob/127a2860740c77f45362e68e0ed7d2d108a39033/src/cryptography/hazmat/primitives/asymmetric/x25519.py#L60-L64\r\n\r\nhttps://github.com/pyca/cryptography/blob/127a2860740c77f45362e68e0ed7d2d108a39033/src/cryptography/hazmat/primitives/asymmetric/x448.py#L60-L64\r\n\r\nIn both instances, the method does not return serialised bytes, but a public key object. The full [generated documentation](https://cryptography.io/en/latest/hazmat/primitives/asymmetric/x25519/#cryptography.hazmat.primitives.asymmetric.x25519.X25519PrivateKey.public_key) is correct, as are the Ed* docstrings.\n", "before_files": [{"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\n\nimport abc\n\nfrom cryptography.exceptions import UnsupportedAlgorithm, _Reasons\nfrom cryptography.hazmat.primitives import _serialization\n\n\nclass X448PublicKey(metaclass=abc.ABCMeta):\n    @classmethod\n    def from_public_bytes(cls, data: bytes) -> \"X448PublicKey\":\n        from cryptography.hazmat.backends.openssl.backend import backend\n\n        if not backend.x448_supported():\n            raise UnsupportedAlgorithm(\n                \"X448 is not supported by this version of OpenSSL.\",\n                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,\n            )\n\n        return backend.x448_load_public_bytes(data)\n\n    @abc.abstractmethod\n    def public_bytes(\n        self,\n        encoding: _serialization.Encoding,\n        format: _serialization.PublicFormat,\n    ) -> bytes:\n        \"\"\"\n        The serialized bytes of the public key.\n        \"\"\"\n\n\nclass X448PrivateKey(metaclass=abc.ABCMeta):\n    @classmethod\n    def generate(cls) -> \"X448PrivateKey\":\n        from cryptography.hazmat.backends.openssl.backend import backend\n\n        if not backend.x448_supported():\n            raise UnsupportedAlgorithm(\n                \"X448 is not supported by this version of OpenSSL.\",\n                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,\n            )\n        return backend.x448_generate_key()\n\n    @classmethod\n    def from_private_bytes(cls, data: bytes) -> \"X448PrivateKey\":\n        from cryptography.hazmat.backends.openssl.backend import backend\n\n        if not backend.x448_supported():\n            raise UnsupportedAlgorithm(\n                \"X448 is not supported by this version of OpenSSL.\",\n                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,\n            )\n\n        return backend.x448_load_private_bytes(data)\n\n    @abc.abstractmethod\n    def public_key(self) -> X448PublicKey:\n        \"\"\"\n        The serialized bytes of the public key.\n        \"\"\"\n\n    @abc.abstractmethod\n    def private_bytes(\n        self,\n        encoding: _serialization.Encoding,\n        format: _serialization.PrivateFormat,\n        encryption_algorithm: _serialization.KeySerializationEncryption,\n    ) -> bytes:\n        \"\"\"\n        The serialized bytes of the private key.\n        \"\"\"\n\n    @abc.abstractmethod\n    def exchange(self, peer_public_key: X448PublicKey) -> bytes:\n        \"\"\"\n        Performs a key exchange operation using the provided peer's public key.\n        \"\"\"\n", "path": "src/cryptography/hazmat/primitives/asymmetric/x448.py"}], "after_files": [{"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\n\nimport abc\n\nfrom cryptography.exceptions import UnsupportedAlgorithm, _Reasons\nfrom cryptography.hazmat.primitives import _serialization\n\n\nclass X448PublicKey(metaclass=abc.ABCMeta):\n    @classmethod\n    def from_public_bytes(cls, data: bytes) -> \"X448PublicKey\":\n        from cryptography.hazmat.backends.openssl.backend import backend\n\n        if not backend.x448_supported():\n            raise UnsupportedAlgorithm(\n                \"X448 is not supported by this version of OpenSSL.\",\n                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,\n            )\n\n        return backend.x448_load_public_bytes(data)\n\n    @abc.abstractmethod\n    def public_bytes(\n        self,\n        encoding: _serialization.Encoding,\n        format: _serialization.PublicFormat,\n    ) -> bytes:\n        \"\"\"\n        The serialized bytes of the public key.\n        \"\"\"\n\n\nclass X448PrivateKey(metaclass=abc.ABCMeta):\n    @classmethod\n    def generate(cls) -> \"X448PrivateKey\":\n        from cryptography.hazmat.backends.openssl.backend import backend\n\n        if not backend.x448_supported():\n            raise UnsupportedAlgorithm(\n                \"X448 is not supported by this version of OpenSSL.\",\n                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,\n            )\n        return backend.x448_generate_key()\n\n    @classmethod\n    def from_private_bytes(cls, data: bytes) -> \"X448PrivateKey\":\n        from cryptography.hazmat.backends.openssl.backend import backend\n\n        if not backend.x448_supported():\n            raise UnsupportedAlgorithm(\n                \"X448 is not supported by this version of OpenSSL.\",\n                _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM,\n            )\n\n        return backend.x448_load_private_bytes(data)\n\n    @abc.abstractmethod\n    def public_key(self) -> X448PublicKey:\n        \"\"\"\n        Returns the public key associated with this private key\n        \"\"\"\n\n    @abc.abstractmethod\n    def private_bytes(\n        self,\n        encoding: _serialization.Encoding,\n        format: _serialization.PrivateFormat,\n        encryption_algorithm: _serialization.KeySerializationEncryption,\n    ) -> bytes:\n        \"\"\"\n        The serialized bytes of the private key.\n        \"\"\"\n\n    @abc.abstractmethod\n    def exchange(self, peer_public_key: X448PublicKey) -> bytes:\n        \"\"\"\n        Performs a key exchange operation using the provided peer's public key.\n        \"\"\"\n", "path": "src/cryptography/hazmat/primitives/asymmetric/x448.py"}]}