the system I'm working on, is to be equipped with NAND flash as "mass" storage. The file system needs to be encrypted. So I plan to use the on-board block level encryption in Linux. But regarding wear levelling I'm unsure if I just can hook e.g. /dev/mtd1 to the crypto-device mapper and then use JFFS2 on top of that.
Are there any suggestions?
For the records: My solution for now is to use UBIFS on the NAND device for unencrypted data and an image file which is connected via losetup and cryptsetup with the device mapper. This results in an encrypted block device which can be formatted with any FS (I used ext4).