Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
(Scroll down for the English version)


Olá,   

O Decreto de Lei nº 48/2020, de 3 de agosto, traz uma mudança para informar condições e predefinir o retorno simplificado das informações comerciais (IES). Esta mudança legal exige que o ficheiro SAF-T seja criptografado antes do seu envio para as autoridades fiscais em Portugal.  

Portanto, os campos com dados confidenciais do ficheiro SAF-T devem ser criptografados usando uma chave de encriptação fornecida pela Imprensa Nacional Casa da Moeda (INCM).  

Os requisitos do processo de encriptação  

Com base nos requisitos legais, segue o que você precisa para o processo de encriptação:  

  • Você precisa de um código de segurança disponibilizado através de viaCTT.  

  • Você precisa de uma chave criptográfica, que é gerada e armazenada durante o período legal de maneira segura.   

  • Antes do processo de encriptação, você aplica a soma de verificação (checksum) no ficheiro.  


Etapas para encriptação de ficheiros antes do envio às autoridades fiscais  

O INCM definiu um processo para solicitar e obter as chaves necessárias de forma segura. Para obter um ficheiro criptografado, você pode seguir as seguintes etapas:  

  1. Crie uma solicitação de código de segurança, que é um pré-requisito para obter a chave simétrica. Esta chave posteriormente permitirá que o ficheiro seja criptografado por meio do serviço Web CryptoSAF-T. Cada empresa deve fazer essa solicitação manualmente.
    Em resposta, um código de segurança será enviado para a caixa postal eletrônica da empresa (através do viaCTT).  

  2. Obtenha o código de segurança da caixa postal eletrônica. 

  3. No web service CryptoSAF-T, você pode obter a chave criptográfica utilizando o código NIF, o ano fiscal e o código de segurança da sua empresa. Esta chave permitirá a encriptação de campos sensíveis no ficheiro. Cada empresa deve fazer essa solicitação manualmente. 

  4. Você deve armazenar o algoritmo de encriptação no sistema SAP para continuar com o processo de encriptação. 

  5. Crie o ficheiro SAF-T para o ano fiscal pretendido (o primeiro ano deve ser 2021). Você pode executar esta etapa a qualquer momento desde que o total de verificação esteja disponível.  

  6. Aplique a soma de verificação no ficheiro que você extraiu no passo 1. Você pode executar esta etapa a qualquer momento desde que o total de verificação esteja disponível.  

  7. Aplique a chave criptográfica para anonimizar campos sensíveis.  

  8. Envie o ficheiro criptografado às autoridades fiscais.  


O que são campos sensíveis e quais são?  

Campos sensíveis são campos que contêm dados pessoais ou descrições e que não podem ser compartilhados no âmbito deste processo. Para obter a lista de campos sensíveis, você pode verificar o seguinte anexo ao Decreto-Lei 48/2020: https://dre.pt/application/conteudo/139348418 

Note que as datas definidas neste decreto foram posteriormente alteradas na Lei 75-B/2020, artigo 404. 

Mais informações sobre CriptoSAF-T  

Você pode encontrar mais informações sobre CryptoSAF-T no site oficial da Imprensa Nacional Casa da Moeda (INCM): https://cryptosaft.incm.pt/index.html 

Você também pode consultar a assistência do produto no SAP Help Portal para saber mais sobre SAF-T:    

Alguma dúvida? Deixe um comentário abaixo ou deixe seu feedback sobre a ajuda da aplicação diretamente no SAP Help Portal usando a funcionalidade de comentários. Não se esqueça de seguir a tag SAP S/4HANA aqui na SAP Community para ficar atento às últimas notícias.   

Siga também este blog para atualizações futuras. 

Até a próxima!

Dora Koncsos

#SAPGoGlobal #SAPLocalization

***

SAF-T for Portugal: Encryption of SAF-T File as a prerequisite for reporting  



Hi everyone,   

The Law-Decree no. 48/2020 of August 3 brings a change for us when it comes to reporting conditions for prefilling the simplified business information return (IES). This legal change requires us to implement the encryption process before the submission of the Standard Audit File - Taxation (SAF-T) accounting file to the tax authorities in Portugal.  

Therefore, sensitive data fields of the SAF-T file must be encrypted using an encryption key that is provided by Imprensa Nacional Casa da Moeda (INCM).  

The encryption process requirements 

Based on the legal requirements, you need the following for the encryption process:  

  • You need a security code made available through viaCTT.  

  • You need a cryptographic key, which is generated and stored during the legal period in a secure manner.   

  • Before the encryption process, you calculate a checksum on the file.  


Steps for file encryption before submission to the tax authorities 

INCM set up a process to request and obtain the necessary keys using the best state-of-the-art techniques to ensure security. To obtain an encrypted file, you can follow these steps:  

  1. Create a security code request, which is a prerequisite for obtaining the symmetric key. This key will later enable the file to be encrypted via the CryptoSAF-T web service. Each entity must trigger this request manually.
    In response, a security code will be sent to your electronic mailbox (through viaCTT).  

  2. Get the security code from the electronic mailbox.  

  3. On the CryptoSAF-T web service, you can obtain the cryptographic key using your company's TIN code, fiscal year, and security code. This key will allow the encryption of sensitive fields in the file. Each entity must trigger this process manually. 

  4. You must store the encryption algorithm in the SAP system to proceed with the encryption process. 

  5. Create the SAF-T file for the relevant fiscal year (the first year should be 2021). 
    You can perform this step any time as long as the checksum is available.  

  6. Apply a checksum on the file that you extracted in step 1.
    You can perform this step any time as long as the checksum is available.

  7. Apply the cryptographic key for the anonymization of sensitive fields.

  8. Send the encrypted file to the tax authorities. 


What are sensitive fields, and which are those? 

These are fields that contain personal data or descriptions and that cannot be shared within the scope of this process. To obtain the list of sensitive fields, you can check the following Annex to Decree-Law 48/2020: https://dre.pt/application/conteudo/139348418. 

Note that the dates defined in this decree were later amended in Law 75-B/2020, article 404.   

More information about CryptoSAF-T 

You can find more information about CryptoSAF-T in the INCM official website: https://cryptosaft.incm.pt/index.html.  

You can also refer to the product assistance in SAP Help Portal to find out more about SAF-T:     

Got any questions? Please leave a comment below or give feedback about the application help directly in the SAP Help Portal by using the comments feature. And don’t forget to follow the SAP S/4HANA tag here on SAP Community to stay tuned to the latest news.   

Also follow this blog for any future updates.

Best regards,

Dora Koncsos

#SAPGoGlobal #SAPLocalization