> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/copy-of-privado-editran-v5.3-cics/utilidades-y-codigos/anexo-d.-sistema-de-criptografia-en-onesait-editran/errores-de-cifrado.md).

# Errores de cifrado

Cuando se produce un Error Criptográfico, editran da una información local del error producido y envía al remoto una petición de liberación con el Motivo del error, liberando posteriormente la conexión.

En el extremo donde se produce el error se informa del Código de Retorno devuelto por el producto que proporciona los servicios criptográficos (CRIPTOlib/DES 3.0, BDKDES, PCF, CUSP, TSS, ICSF, ...), por lo que, de producirse, habría que consultar las referencias que del return-code y/o Reason‑Code se dan en el correspondiente manual de cada producto, como:

* CRIPTOlib/DES: "Criptolib/DES 3.0 versión MVS. Sistema de Seguridad DES. [Instalación](/documentacion-editran/copy-of-privado-editran-v5.3-cics/instalacion.md).
* CUSP/3848: "Cryptographic Unit Support: Installation Reference Manual"
* TSS/4753: "Transaction Security System. Programming Guide and   Reference"
* ICSF/ICRF: "Integrated Cryptographic Service Facility/MVS. Aplication Programmer's Guide".

Los Motivos editran de los Errores Criptográficos que pueden ocurrir son:

* (ERR1): Error al obtener el Label en el extremo que inicia la sesión.
* (ERR2): Error al generar la incertidumbre o la firma.
  * Si AUTENTICACION es DES: Probable error en clave local.
  * Si AUTENTICACION es RSA: Si el error se produce en la firma, el problema puede ser en la clave local (Privada).
  * Si el error es en la incertidumbre, el problema puede ser en la clave remota (pública).
* (ERR3): Error al intentar generar clave de sesión.
  * Si AUTENTICACION es DES: Error en clave local.
  * Si AUTENTICACION es RSA: Error en clave remota.
* (ERR4): Error al obtener clave remota.
* (ERR5): Error al intentar descifrar incertidumbre o firma.
  * Si AUTENTICACION es DES: Probable error en clave remota.
  * Si AUTENTICACION es RSA: Si el error se produce en la firma, el problema puede ser en la clave remota(Pública).
  * Si el error es en la incertidumbre, el problema puede ser en la clave local (privada).
* (ERR6): Error al descifrar clave de sesión.
  * Si AUTENTICACION es DES: Probable error en clave remota.
  * Si AUTENTICACION es RSA: Error en la clave local.
* (ERR7): Error al cifrar dato (sesión establecida)".
* (ERR8): Error al descifrar dato (sesión establecida)".
* (ERR9): Claves incompatibles.
  * Si en versión CRIPTOGRAFICA tiene 3.0 o 4.0 un (ERR9) significa que las claves de Intercambio externas utilizadas en el proceso de autenticación no coinciden en ambos extremos. Aun así, el mensaje editran que describe este error vendrá acompañado de otro que informa en cada extremo del "Label" de la clave de intercambio utilizada (8 últimos octetos diferentes de "blancos", de los 64 octetos de la etiqueta que identifica a una clave). De esta forma, ambos extremos pueden verificar que la Interfaz de claves externas identifica de forma correcta a la clave de intercambio externa que realmente se pretende utilizar.

```
|   ERR01 - ERROR AL OBTENER EL LABEL (CLAVE LOCAL) EN EL EXTREMO QUE INICIA  
|           LA SESION.                                                        
|                                                                             
|   ERR02 - ERROR AL GENERAR LA INCERTIDUMBRE O LA FIRMA.                     
|           * SI AUTENT. DES, PROBABLE ERROR EN CLAVE LOCAL.                  
|           * SI AUTENT. RSA, SI EL ERROR SE PRODUCE EN LA FIRMA, CLAVE LOCAL 
|             ERRONEA.                                                        
|           * SI AUTENT. RSA, SI EL ERROR SE PRODUCE EN LA INCERTIDUMBRE,     
|             CLAVE REMOTA ERRONEA.                                           
|                                                                             
|   ERR03 - ERROR AL INTENTAR GENERAR CLAVE DE SESION.                        
|           * SI AUTENTICACION ES DES, ERROR EN LA CLAVE LOCAL.               
|           * SI AUTENTICACION ES RSA, ERROR EN LA CLAVE REMOTA.              
|                                                                             
|   ERR04 - ERROR AL OBTENER CLAVE REMOTA.                                    
|   ERR05 - ERROR AL INTENTAR DESCIFRAR LA INCERTIDUMBRE O FIRMA.             |
|           * SI AUTENT. DES, PROBABLE ERROR EN CLAVE REMOTA                  |
|           * SI AUTENT. RSA, SI EL ERROR SE PRODUCE EN LA FIRMA PUEDE SER UN |
|             PROBLEMA EN LA CLAVE REMOTA (PUBLICA).                          |
|           * SI AUTENT. RSA, SI EL ERROR SE PRODUCE EN LA INCERTIDUMBRE, ES  |
|             UN PROBLEMA EN LA CLAVE LOCAL (PRIVADA).                        |
|                                                                             |
|   ERR06 - ERROR AL DESCIFRAR LA CLAVE DE SESION.                            |
|           * SI AUTENTICACION ES DES, ERROR EN LA CLAVE REMOTA.              |
|           * SI AUTENTICACION ES RSA, ERROR EN LA CLAVE LOCAL.               |
|                                                                             |
|   ERR07 - ERROR AL CIFRAR DATO (SESION ESTABLECIDA).                        |
|                                                                             |
|   ERR08 - ERROR AL DESCIFRAR DATO (SESION ESTABLECIDA).                     |
|                                                                             |
|                                                                             |
|   ERR09 - LA INCERTIDUMBRE O LA FIRMA DESCIFRADAS, NO COINCIDEN. LAS CLAVES |
|           EMPLEADAS SON DISTINTAS EN AMBOS EXTREMOS.                        |
|           * SI AUTENTICACION DES, ERROR EN LA CLAVE LOCAL.                  |
|           * SI AUTENTICACION RSA Y NO COINCIDE INCERTIDUMBRE, ERROR EN LA   |
|             CLAVE LOCAL.                                                    |
|           * SI AUTENTICACION RSA Y NO COINCIDE FIRMA, ERROR EN CLAVE REMOTA |
|                                                                             |
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.editran.onesait.com/documentacion-editran/copy-of-privado-editran-v5.3-cics/utilidades-y-codigos/anexo-d.-sistema-de-criptografia-en-onesait-editran/errores-de-cifrado.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
