В документации (https://nodejs.org/api/crypto.html#crypto_cipher_setautopadding_autopadding) сказано:
Отключение автоматического заполнения полезно для нестандартного заполнения, например, с использованием 0x0 вместо заполнения PKCS.
Таким образом, он использует "PKCS". Более конкретно, PKCS7.
PKCS7 определил тот же алгоритм заполнения, что и PKCS5, но PKCS5 предполагал, что все шифры будут иметь размер блока в 8 байт (64 бита). Версия PKCS7описывает его как k-байтовый блок. На практике люди игнорируют тот факт, что PKCS5 имеет фиксированный размер блока, а «заполнение PKCS5» и «заполнение PKCS7» - это одно и то же.
PKCS5 (https://tools.ietf.org/html/rfc2898#section-6.1.1):
4. Concatenate M and a padding string PS to form an encoded
message EM:
EM = M || PS ,
where the padding string PS consists of 8-(||M|| mod 8) octets
each with value 8-(||M|| mod 8). The padding string PS will
satisfy one of the following statements:
PS = 01, if ||M|| mod 8 = 7 ;
PS = 02 02, if ||M|| mod 8 = 6 ;
...
PS = 08 08 08 08 08 08 08 08, if ||M|| mod 8 = 0.
PKCS7 (https://tools.ietf.org/html/rfc5652#section-6.3):
Some content-encryption algorithms assume the input length is a
multiple of k octets, where k is greater than one. For such
algorithms, the input shall be padded at the trailing end with
k-(lth mod k) octets all having value k-(lth mod k), where lth is
the length of the input. In other words, the input is padded at
the trailing end with one of the following strings:
01 -- if lth mod k = k-1
02 02 -- if lth mod k = k-2
.
.
.
k k ... k k -- if lth mod k = 0