Encrypting a JDEC file in Lattice MachxO2
The Lattice Diamond 2.1 help for bitgen on command line says this is only available for LatticeECP2S and LatticeXP2 devices. Look for bitgen -e -k and -s options.
Maybe running these options on MachXO2 device works...