it is described a method for encrypting and a method for decrypting at least a portion of a dataset being stored in a memory , wherein the dataset has at least two dimensions . the described multi - dimensional cryptographic methods comprise forming a first keystream being assigned to a first dimension of the dataset and forming a second keystream being assigned to a second dimension of the dataset the encrypting method further comprises encrypting each data packet of the portion of the dataset by using a combination of the first keystream and the second keystream . the decrypting method further comprises decrypting each data packet of the portion of the dataset by using a combination of the first keystream and the second keystream . it is further described a method for temporarily storing at least a portion of a dataset into a memory and a device for handling a dataset , which method and which device take advantage of the above - described encrypting method and / or the above - described decrypting method .