# jsonW 1.4.0: encryption at rest, document masks and agent protocol profiles A .jsw file can stay encrypted on disk, with the key kept outside it. CPF and CNPJ take a mask that refuses an invalid value. And 49 objects of the agent protocols have a profile proven with a round trip. November 15, 2026 · jsonW 1.4.0 · https://jsonw.org/en/newsroom/version-1-4-0-encryption-masks-profiles ## What 1.4.0 adds Three things. Encryption at rest, for a file that lives on disk. Document masks for several countries, which refuse an invalid value when writing. And jsonW profiles for agent protocols, with each object sampled and checked. Whoever uses none of them sees no difference: a file with no encryption and no new type comes out byte for byte the same as one written by 1.3.14. ## Encryption at rest The .jsw file can stay encrypted on disk (XChaCha20-Poly1305). The tenant key stays outside the file: a file of 64 hexadecimal characters, pointed to by WJSW_CHAVE_ARQ or by the --chave option. Without the key, the encrypted file does not open. ``` $ wjsw cifrar cifrado.jsw --chave chave.hex $ wjsw conferir cifrado.jsw FALHOU: arquivo cifrado: falta a chave do tenant (WJSW_CHAVE_ARQ ou credencial wjsw-chave) $ wjsw para-texto cifrado.jsw --chave chave.hex {id:1,cpf:"12345678909",cnpj:"11222333000181"} {id:2,cpf:"12345678909",cnpj:"11222333000181"}``` Real output of wjsw 1.4.1. The tool's messages are in Portuguese. cifrar prints nothing. Without the key, conferir exits with code 1. ## Document masks In the mascara(tipo) column, jsonW accepts the document with or without punctuation, stores the canonical form and refuses what is not valid. The input file clientes.jsw.txt carries CPF and CNPJ with punctuation; the write keeps only the digits. ``` $ wjsw de-texto "id:i64,cpf:mascara(cpf),cnpj:mascara(cnpj)" clientes.jsw.txt docs.jsw 2 linhas -> docs.jsw $ wjsw para-texto docs.jsw {id:1,cpf:"12345678909",cnpj:"11222333000181"} {id:2,cpf:"12345678909",cnpj:"11222333000181"} $ wjsw de-texto "id:i64,cpf:mascara(cpf),cnpj:mascara(cnpj)" invalido.jsw.txt inv.jsw valor 1 nao coube no esquema``` The last command exits with code 1: CPF 111.111.111-11 is not valid. The types include CPF, CNPJ, CEP, phone, PIS, RENAVAM, IBAN, Portugal's NIF, France's SIREN and SIRET, the United States' EIN and SSN, Mexico's CURP and RFC, Chile's RUT and Italy's partita IVA. The list is in mascara/wmascara.h. ## Profiles for agent protocols The perfis/ folder has one file per protocol, with the jsonW schema of each object: A2A, UCP, ACP, AP2, Verifiable Intent, x402, MPP, AG-UI and OpenTelemetry, plus L402 and PIX. Each object has a stored sample and a checked custody, and comes back the same after a round trip. ``` $ bash perfis/provar-perfis.sh bin/macos-arm64/wjsw | tail -1 perfis: 49 ok, 0 falhas``` ## Compatibility Measured with the same schema in both versions. A file without encryption written by 1.4.1 came out byte for byte the same as one written by 1.3.14. 1.3.14 does not open the encrypted file: it refuses with versao do jsonW desconhecida instead of reading ciphertext as data. ``` $ wjsw para-texto cifrado.jsw # with the 1.3.14 binary versao do jsonW desconhecida``` ## Where it is In the wjsw tool, in the library and in the SDKs. On npm: npm install @wortictecnologia/jsonw@1.4.0. Version 1.4.1, which fixes the permission view, comes right after: see the 1.4.1 post. Fonte: https://github.com/developer-wortic/jsonw/releases/tag/v1.4.0