METHOD AND DEVICE FOR ENCRYPTING A MESSAGE

Abstract: A method and a corresponding device for generating true random numbers for use in encryption of a message for secure transmission of said message from a sending device to a receiver, or for authentication of a sent message. An optical image represented by optical data is obtained by an optical sensor and processed in order to improve the stochasticity of the optical data. The thus processed data is then used for generating random numbers which can be used as an encryption key, or for generating an encryption key, for subsequent use in an encryption algorithm for encrypting the message. The method is implemented in a digital pen (DP) to be used in an information management system.

Description: METHOD AND DEVICE FOR ENCRYPTING A MESSAGE Field of invention The present invention generally relates to the field of transmitting information from a sender to a receiver. More specifically, the present invention relates to a method and a device for encrypting a message for secure transmission of such a message from a sending device to a receiver. The invention further relates to a computer readable medium comprising instructions for bringing a computer to perform such a method, and a sending device and a system, respectively, comprising such a device. Background of the invention During transmission of information from a sender to a receiver, for example in a system including hand-held devices, there are basically four aspects that need to be fulfilled for obtaining a secure transmission with regards to authenticity, integrity, confidentiality and non-repudiation. However, confidentiality, i.e. that the information is kept secret during the transmission, is crucial in the field of digital communication, for exam- • pie in financial transactions or in e-commerce. This aspect, as well as the other aspects, can be met by using cryptography. When using cryptography or a network security algo- rithm based on cryptography, random number data is used for different reasons and play an essential role. For example, random numbers are frequently used as encryption keys or for generation of encryption keys. Furthermore, random data is by definition difficult to determine or guess. Common methods of cryptography include symmetric encryption and asymmetric encryption. When using symmetric encryption, the same key is used for both encryption and decryption. The encryption key is used in conjunction T) rr CQ H- φ 0! ø rr H- 0 Ω J hi 9J 0 P 0 M 3 SD 3 3 Pi ø 0 3 3 o * Φ H to ω ø Ω tr P ø § ■ Φ t n ΪSl SD i φ 0 Hi rt Φ ø i Φ Hi φ f i Φ i rr 0 SD CQ A widely used technique for pseudo random number generation is the linear congruential method. A sequence of numbers is obtained via the following equation X n+ ι= (aX n +b) mod c, where X 0 is an initial number, i.e. the random seed. Usually, in a handheld device or a computer, the microseconds of the internal clock are used as random seed to initiate the algorithm. One problem with the above-mentioned method is that once a value, the random seed, has been chosen, the subsequent numbers in the sequence follow deterministically. This means that someone having knowledge of a part of the sequence could theoretically determine subsequent elements of the sequence. It is possible to implement more advanced random number generators that use the internal clock as random seed, for example such as the algorithm used in Blue- tooth. This and similar algorithms are able to generate pseudo random numbers with improved statistical characteristics compared to the numbers generated by the linear congruential method. However, the pseudo random numbers are still of an insufficient quality in a statistical sense, i.e. when considering the degree of randomness. Thus, there remains a problem in finding a method, that can be implemented in a system comprising hand-held devices, that provide random numbers of good quality, according to the above-mentioned criterions, for generation of encryption keys for use in encryption algorithms in order to provide a secure transmission of information between a sender and a receiver. Summary of the invention Thus, an object of the present invention is to provide an improved method and device for generating an encryption key and encrypting a message. This and other objects are achieved according to the present invention by providing a method, a computer readable medium, a device, and a system having the features defined in the independent claims. Preferred embodiments are defined in the dependent claims. According to a first aspect of the invention, there is provided a method for encrypting a message for secure transmission of said message from a sending device to a receiver. The method comprises the steps of obtaining op- tical data, generating an encryption key using said optical data as random seed, and encrypting said message using said encryption key in an encryption algorithm. According to a second aspect of the invention, there is provided a device for encrypting a message for secure wireless transmission of said message from a sender to a receiver. The device comprises receiving means for receiving optical data, said optical data representing values of an optical parameter, processing means for generating an encryption key using said optical data as random seed, and encryption means for encrypting the message to be transmitted using said encryption key. According to further aspects of the invention there are provided a computer readable medium comprising instructions for bringing a computer to perform the method according to the first aspect of the invention; a sending device arranged for obtaining a message and for sending said message to a receiver, comprising the device according to the second aspect of the invention; and an information management system comprising, inter alia, a plu- rality of digital pens that each comprises a device according to the second aspect of the invention. Thus, the present invention is based on the advantageous insight of using optical data as random seed for generation of an encryption key, which in turn is used in an encryption algorithm for encrypting a message. The optical data obtained in accordance with the method of the present invention presents the requisite degree of ran- domness and unpredictability. In fact, the optical data can be considered as being "truly" random. Consequently, the degree of randomness is higher and the optical data used are more unpredictable as compared to the data used for random seed in the known methods described above . Thus, an improved degree of secrecy of the generated encryption key will be achieved. Traditionally, two distinct and not necessarily compatible criteria are used to determine the quality of a sequence of random numbers, unpredictability and randomness. In a "true" random sequence, each number is statistically independent of any other number in the sequence and is therefore unpredictable. Two criteria are used to validate the randomness of a sequence of numbers. First, uniform distribution of random numbers, which means that the frequency of occurrence of each of the numbers should be approximately the same. Second, independence between random numbers, which means that no value in the sequence can be inferred from any of the others . According to the preferred embodiment of the present invention, a surface, or a portion thereof, is scanned or read with an optical sensor, preferably a camera or a light-sensitive sensor, thereby obtaining optical data representative of characteristics the read surface. The light-sensitive sensor being, for example, a CCD sensor (Charge-Coupled Device) or a CMOS sensor (Complementary Metal-Oxide semiconductor) . The obtained optical data are determined by and represent values of at least one optical parameter, which is representative of physical condi- tions on the portion of the surface. Preferably, the optical data are obtained from a portion of a surface provided with a position code pattern, wherein the position code pattern includes optical readable markings. Each of said markings may be designed more or less arbitrarily. However, the design of each marking is preferably elementary, for example in the shape of round dots as shown in the detailed description below. The position code pattern is implemented using any parameter, which may be used to achieve symbols of the above-mentioned type that may be detected or sensed by a detector or sensor. The parameter may be electrical or chemical or of any other type. However, the position code pattern is preferably optically readable since this facilitates the appliance of the pattern onto the surface. Accordingly, the pattern should have the capability to reflect light, which not necessarily has to have a wave- length in the visible spectrum. Preferably, the parameter sensed and used for the generation of the encryption key is brightness, which is a relative measure of the intensity of the energy output of a light source that is visible for an optical sensor. In the preferred embodiment of the present invention, the brightness of light that is reflected from a portion of an illuminated surface is registered. Of course, the sensed light does not necessarily have to constitute reflected light. Sensing of emitted light from luminous surfaces are also contemplated within the scope of the present invention, or any combinations of emitted and reflected light. The brightness in the sensed light may, for example, depend on variations in the surrounding illumination, the quality of the printing of the pattern, the blacking of the markings, and/or the quality of the surface, e.g. a paper surface. Biometric factors may also have an impact on the brightness, for example the inclination of the pen. These and other factors introduce a considerable degree of randomness in the optical data. Furthermore, the fact that the optical sensor in itself is a noise generator will even further enhance the degree of randomness in the optical data. According to preferred embodiments of the invention, the optical data are processed according to a prepro- grammed order or scheme and organized in data fields of a predetermined length. The data fields, in turn, are pref- erably organized in data records according to a predetermined scheme, e.g. in a predetermined order. According to a specific preferred embodiment of the present invention, and in order to even further improve the stochasticity of the optical data organized in said data records, the order of the data fields within the data records are rearranged according to a cyclic reordering algorithm. According to the cyclic reordering algorithm, the order of the rearranged data fields in dif- ferent data records may differ from one data record to another. Thus, a number of different reordering schemes may be used, including the case that for some data records, the order of the data fields is not altered at all. Preferably, the cyclic reordering is performed by shift- ing all data fields in each data record. The data fields may be shifted by a number of steps ranging from zero, i.e. no shift takes place, to a number corresponding to the number of data fields in the data record minus 1. Thus, the reordering algorithm contains information as to the number of steps each data field is shifted for a specific data record. According to a specific embodiment of the present invention, the order of the data fields in each record included in a first set of data records are rearranged according to a first reordering algorithm. Thereby, a first set of rearranged data records is obtained. Then, the order of the data fields in each data record of a second set of data records are rearranged according to a second reordering algorithm, whereby a second set of re- arranged data records is obtained. In the generation of the encryption key, the first set of rearranged data records forms key data and the second set of rearranged data records forms input data, or vice versa, of the encryption key used in the encryption algorithm. Alternatively, the key data and the input data form encryption data that can be used as material in an encryption process. For example, the material can be encrypted with the public ω ω N3 M H 1 in o in O in O in 0 CQ o Φ ii Pi Φ Hi X 0 SD ϋ 3 TJ ra h- 1 Φ 3 - 3 φ rt w hi μ- 0 Ω hi SD h-" in Φ ~. 0 Ω £. hi tr ≤ μ- T3 Ω rt tr μ- oo 0 SD ø hi Φ 3 m SD rt hj Φ tr SD Φ 3 0 Ω CQ μ- Φ Ti P. tr Φ hi CQ SD 0 Pi SD hi Φ 10 10 t to μ> μ> in o in o in o ( l ω O to to μ> in o U1 o in o in SD O tr rt h-* tr Φ Φ ii SD 0 03 fi rt SD H- rt μ- μ- φ 03 rt 3 μ- μ- Ω rt u tr I- 1 μ- ø TJ fi rt 0 tr Ti Φ Φ ti 03 rr Ω μ- 0 φ TJ ω Φ 1 fU o 0 ti Hi Φ rr Ω tr 0 Φ 0 Ω Ti Φ hi μ- Φ < CQ SU φ tr 0 X rt Φ μ- ø 03 <J 0 Φ Ω ø rt tr μ- su 0 03 0 • However, the present invention is not limited to a specific encryption algorithm. According to preferred embodiments, the method and the device of the present invention is particularly well suited for implementation in a hand-held device, such as a digital pen. Such a digital pen would then comprise an optical sensor for obtaining a message to be transmitted, for instance from a surface provided with a position code pattern as described above. Preferably, the digital pen also comprises illumination means for illuminating a surface to be read by the optical sensor. The illumination means and the optical sensor may be restricted to a limited wavelength range, such that the optical sensor primarily detects reflected light that are provided by the illumination means. Preferably, the optical sensor is also used for obtaining the optical data used for generating an encryption key. Thereby, no additional sensor or random number generator is required within the limited interior of the digital pen. Furthermore, the digital pen comprises a processor or processing means for performing the steps of the present invention, as well as all the steps required for obtaining, encrypting and transmitting a message. Furthermore, the digital pen also comprises, inter alia, suit- able storing means for storing data, power supply means, e.g. a battery, as well as transmission means for transmitting the message to a receiver. According to a further embodiment of the invention, a pressure sensor is provided for obtaining pressure data. Since the pressure data relates to biometric factors, such as movements of the hand, the degree of randomness of the pressure data is high. The pressure data can then be used in combination with the optical data as random number data or random seed, in the generation of an encryption key, in order to enhance the degree of randomness in the random seed. Also, according to yet another embodiment of the invention, time data are obtained and used in combination with the optical data as random seed in order to enhance the stochasticity of the random seed. Although time data is deterministic by nature, the degree of randomness of the combined data will not be decreased. The time data are preferably provided by the internal clock of the processing means. The thus obtained random seed may be subsequently used in the generation of the encryption key in the manner as described above. As understood be the person skilled in the art, there are other related areas where the random numbers generated from optical data in accordance with the present invention may be utilized. One such area is authenti- cation of a sent or received message. Another area is key transport from a sender to a receiver. Then, the random numbers are encrypted with a public key of the receiver and are used as an encryption key or key data, to be subsequently compressed to an en- cryption key, for a symmetric encryption algorithm. The random numbers can also be used to generate prime numbers for RSA or DH keys . As realized by the person skilled in the art, the method and the device of the present invention, as well as the preferred embodiments thereof, are suitable to realize as a computer program or a computer readable medium, preferably within the contents of a digital pen. Further objects and advantages of the present invention will be discussed below by means of exemplifying em- bodiments. Brief description of the drawings Preferred embodiments of the invention will now be described in greater detail with reference to the accom- panying drawings, in which Fig. 1 shows an embodiment of an information management system according to the present invention; ω ω IS ISJ μ> H in o ( Jl o in O in μ- ø ø Ω IQ rt i TJ Φ • τ| ϋ ^i < μ- 0 μ- μ- CQ <! iQ Ω • μ- Φ Pi Φ [ SD ϋ Ω CQ ω Ω Ω s; Ω O tr μ- tr fi φ rt Φ P. 3 tr 3 μ- SD SD ø rt SD rt CQ μ- μ- Ω TJ Ω rt SD 0 SD 0 03 μ- rt ■ <; rt - ; tr μ- Φ 03 0 03 tr ø T 0 1 o S i-a 1 hi 3 Ω a l φ 03 0 03 03 Si Φ SD Φ fu 0 0 0 rt TS Φ SD φ μ- 3 rt 3. ø o rt u < 0 Φ 0 Φ Pi fi Pi ø μ- ø μ- rt 3 3 μ- φ Φ 0 ø ø 0 rt rt 0 o SD SU 03 TJ Φ ti 0 0 Pi Pi 1 1 ω > t to μ> μ> in σ in o in 0 in > rt rt f ø SD to hj tr φ SD μ- ϋ CQ 03 Φ 0 Ω Hi >τJ 0 α 0 Φ ω 0 SU φ Ω SD Ω tr rt 03 Φ TJ 0 Pi Φ ø μ- rt ø 0 Ω H " SD 0 ø 0 i SU φ Φ ϋ 03 <1 Si φ μ- P. 0 rt SD rt μ- rt L-J 0 SD H Pi 0 ^ SD hj rt rt φ S tr tr Φ SD SU ti rt 03 Φ μ- φ rt 0 O IQ Ω - td rt α rt 0 ω tr Φ rt tr s; Φ tr 0 μ- o 3 Ω SD tr 1 ø 0 0 μ- Ti Hi ø SD 1 ø Ω 0 1 μ- rt u IO CO to μ 1 μ> in o in o in o in μ- TJ rt 0 3 03 rt SD H 3 rt 03 Ω 03 Ti 3 0 0 3 3 03 tr SD 0 rt rt rt 3 Φ H SD TJ μ- ø Ω • x SU φ SD 0 SD fi 0 φ ø φ SD Φ o SD TJ Hi SD Φ Φ • . ø tr tr tr tr g 0 φ ø T! X φ φ tr rt 0 1 X Φ rt 03 ϋ rt rt fi 03 rt Φ rt 03 fi 03 Φ μ- Φ φ μ- ' ø 0 • SD S 0 Ω Φ 03 Φ rt μ- <! μ- μ- hj rt μ- 03 <! 3 0 03 Ω ti rt Su 03 rt ø fi 0 03 0 Hi SD 0 μ- ii SD μ- 0 μ- rt 0 SD tr 0 fϋ μ- Φ 0 i P. tr SD tr X » tr 0 Φ SD Hi φ hj SD h- 1 Hi ø 0 H CQ 0 0 0 Ω μ- 0 rt Φ 0 CQ Ω SD SD Hi φ μ- μ- 1-3 Ω φ rt φ μ- 03 03 ? Ω X rt Φ 0 Φ ti CQ φ 0 0 φ φ ø Ω ø CQ CQ ø tr μ- Φ SD rt TJ SD rt Φ 3 Φ rt 03 03 Pi ø CQ ti Pi s; 03 03 CQ rt rt & μ- μ- Φ Φ ø X hi 03 CQ Pi 0 0 0 0 0 Pi tr ti rt - Φ SU tr Φ μ- hi tr rt rt rt CQ 0 0 > SD ϋ 0 Hi TJ hi μ- Hi TJ tr X Hi rt su Ω 0 Ω Q μ- rt 0 SD φ SD SD SI 03 0 SD ≤ 03 \X rt rt rt φ Φ TJ Ω SU 0 φ $ Φ 0 S ø 0 Φ 0 μ- rt Hi tr Hi 03 rt h- 1 0 fi rt Φ rt to SD SD tr rt fi 03 SD tr Ω fi tr Ω hi tr Si i hi ø rt rt 0 SD 0 tr hi 03 SD 1 μ- X φ X φ tr SD - hj φ rt φ Φ rt SU X φ SD X SD Φ ii rt SD SD φ Φ TJ TJ rt rt 0 < X 3 0 ti φ rr rt TJ Si SD 3 ii hi Pi 03 Φ Pi rt Pi h- 1 0 rr Φ Φ Φ SD TJ Φ μ- 0 € 0 TJ 0 μ> X u- φ 0 μ- Φ hi Φ Φ SD 03 CQ 3 0 0 0 0 3 tr SD SD • tr TJ 03 hi SD Φ 03 0 0 Hi Ω fi SD TJ 0 X Φ Φ 0 CQ 03 TJ SD 0 rt 03 0 φ rt μ- 0 • -<. 03 TJ ti tr μ- Pi SD μ- Hi SU X Φ 0 SD fi ϋ fi ø φ Sϋ CQ 0 0 P. tr Ω fi 03 φ Φ rt tr μ- 0 Ω φ to rt X μ- 03 ø 3 0 <J <! iX Φ α t ) fi φ μ- SD Φ tr rt rt rt ti TJ μ- tr o 3 fi fi α tr Φ ø O rt TJ s; Φ μ- fi T3 J SD 03 • rt μ- 0 rt rt SD Φ 0 0 ø 03 Φ tr φ ω Φ 0 α tr 03 ti Ω 0 rt 0 ø tr tr rt SD X 3 3 hj Q rt rt ø tr 0 0 fi rt TJ d Φ Φ Φ TJ 0 su SD 0 > Pi Φ Φ fi X SD SD rt tr Φ rt 0 CQ rt 3 ø SD tr ii . rt ø Φ Hi ø 0 hi μ- ø 1 μ- Φ SD x μ- Ω 0 SU 03 Φ Pi 3 μ- tr Φ fi Φ 0 TJ Φ tr ø tr fi Pi Si CQ ø to <j hi SD SD 0 0 Q < Ω 0 X tr 0 ø SD μ- rt <! 3 0 1 Φ μ- SD SD SD Ω μ- hj ϋ ϋ 03 £ μ- Φ Hi • * 0 Pi tr Hi rt φ TJ Ω s; 0 03 μ- tr 03 3 rt ø rt rt rt tr Ω & 0 Pi ϋ Sϋ 03 SD SD CQ SD £ SD -<. 0 03 TJ tr 0 hi --<. Pi Φ μ- SD TJ ϋ 0 TJ tr tr SD 0 0 ø fi fi fi Ω CQ Ω μ- ø rr _ CQ x hi 03 φ rt μ- Φ to " ii Φ Φ Φ 0 fi ø ϋ 03 Φ Φ rt Hi 03 SD rt • SD 0 μ- CQ μ- Ω w 0 rt 03 μ- μ- ø TJ φ CQ 0 ϋ φ X X 03 03 μ- 0 0 0 CQ 0 Φ μ- tr ø CQ rt Ω Ω 0 0 Φ Hi φ 0 - hi 03 * CQ Pi 0 03 03 0 X ti 1 Φ fi • ø SU Φ 0 SU SD 0 0 rt 3 0 ti 0 0 f tr Φ 0 Φ Pi Ω 0 in Ω μ- x Φ 03 ti hi rt rt TJ Φ fi <J I en fi μ- 1-3 SD hi 0 0 tr SU Ω fi hi 03 rt SU ø φ CQ SU _ Φ 0 μ> Φ Pi μ- SD φ tr φ Ω S ø 0 ø - CQ < x- rt 0 Φ rt 0 Φ Φ tr x rt Ω - μ- 03 hi 0 μ- fi o Hi 0 ii O to Φ < μ- μ- 1 tr φ SU fi CQ • P rt Φ x Φ rt TJ CQ 03 rt ø ø SD 0 0 Φ Pi hi μ- rt CQ 0 Ω ø Φ Ω tr fi TJ 0 SD φ ϋ Φ 03 0 • 0 3 rt Φ 0 CQ 03 rt x hi rt ø Φ 0 P. tr TJ φ TJ 0 0 SD μ- 0 φ TJ P. Hi P Φ ii Hi 0 tr 0 » 0 $ ø P. fi rt μ- Φ 0 φ Ω ϋ ø 03 ø 0 03 μ- φ SD fi rt μ> fi Φ rt tr fi ϋ Φ 0 μ- O ø φ 0 tr ø 0 ø φ CQ 03 rr ø 0 TJ Ω TJ <! SD • rt Φ Φ Hi SD s; X fi rt Ti Hi Q 03 rt φ su 0 3 3 Φ 03 Φ 03 CQ φ Φ 0 μ- X tr 03 3 0 rt 3 tr SD f hi SU 03 3 ϋ ø μ- 3 o Ω μ- 03 0 ø ti Ω ι-3 φ s3 ■ <. Φ SD hi SD SD φ 3 to 0 X φ Ω 03 0 P. rt 0 hi rt SD ø 3 TJ * ø rt Φ s tr Φ 03 03 rt μ- ø TJ 03 TJ Pi 0 0 rt fi SD I- 1 ø Φ Φ 03 hi SD X 0 O ø μ- ør Φ 03 tr rt 03 rt Φ 0 ø X rt 0 Pi 3 φ f φ > μ- fi rt Φ Pi SD φ μ- 0 tr μ- ■ . Φ SD SD X 0 rt SD φ 0 0 Ω tr 3 3 03 fi ø 1 Ω 0 CQ tr rt Φ Ω fi ø rt ø SD Ω TJ 03 03 3 CQ Ω SD SD Ω ti Hi rt SD φ ø 0 0 to SD Φ rt tr Φ 0 Φ CQ Φ 03 ø tr 0 rt Φ φ tr 3 ø μ- rt φ SD 03 03 [—• ø TJ tr ø • » rt rt 0 0 fi tr hj H Pi hj Φ fi μ- CQ Φ TJ 03 ø μ- 0 CQ rr Φ φ μ- Hi Φ 03 ø μ- 3 £ TJ 0 *• μ- rt _ 0 X D rt 3 <! ø Pi x Φ CQ ø rt Φ tr TJ P. Ω Ω 0 ti Ω μ- SD 0 o O TJ . ø ϋ φ ø 0 Hi Φ X SD φ Ω φ H Q hj φ rt SD ti SD fi rt 0 ø ii 0 o Pi rt 0 fi X h- 1 hi x Φ rt 1 SU μ- 0 tr 0 hj rt rt μ- Pi Φ μ- Ω tr rt SD fi > rt 03 0 0 03 ø rt 0 SD 03 0 SD Φ Hi 0 ^ 0 0 μ- Φ 0 J to tr 03 ø φ rt φ tr Ω rt ø tr 3 TJ 0 Pi Ω TJ CQ 03 φ 0 0 X fi rt K tr φ SD 03 0 Φ Ω S Φ SD 03 H Φ 3 Φ • Φ 03 Φ SU μ- rt 3 μ- μ- 0 SD μ- • Φ rt μ- X r\ 03 TJ Φ x Φ 0 tr 03 1 μ- Ω TJ SD μ- ø £, Φ ø Ω 3 Ω 0 rt s; ø X μ- • rt Φ X 03 •> X Pi ϋ TJ μ- TJ μ- 3 Q μ- TJ ø Hi 0 SD Hi Ti 0 0 t-3 $ Φ 1 CQ ø ø 0 03 SD SD Φ 03 o Ω SD ø f- X 0 ti 0 0 μ> 0 0 φ Φ > Φ 03 0 3 1 0 fi tr μ- SD μ- μ- SD ii P? 03 ti φ PJ φ 3 X 1 SU 1 X 1 Ω 1 ø 1 1 ø 0 rt 0 1 lo > ISJ to X X in o in o in o in X SD fi Q φ Pi Fig. 3 shows a schematic representation of an embodiment of a sending device designed for reading, for example, a position code pattern of Fig. 2. According to the preferred embodiments of the present invention, the device is a digital pen. The pen DP comprises a housing 5, shaped in a pen-like form. An opening 6 is provided at one end portion of the housing 5. The opening is intended to rest against, or to be held at a short distance from, the surface S from which information is to be obtained. Within the housing 5 an optical unit, an electronic unit, and a current supply unit are incorporated. According to further embodiments of the digital pen, a pressure sensor unit may also be comprised within the housing 5, which will be discussed below. The optical unit comprises a diode 7, arranged to illuminate the surface provided with the position code, and a light-sensitive sensor 8, for example a CCD sensor (Charge-Coupled Device) or a CMOS sensor (Complementary Metal-Oxide semiconductor) , arranged to register two- dimensional images. The current supply unit is in this embodiment a battery 9, arranged in a separate container. The electronic unit 10 comprises a processor device including image-processing means, encryption means and a processor programmed to read images from the sensor 8 and to perform determination of the position and decoding of information on the basis of the images. Furthermore, the processor is programmed to perform computations in order to, for example from an image received from the sensor, calculate properties of the optical data obtained from the image. The data resulting from these computations can be used as input data for other computations or algorithms, such as encryption algorithms. In this embodiment , the AES and RSA algorithms are implemented in the processor device. Also, the electronic unit 10 comprises a memory or data storage that is arranged, for example, to store data received from the processor or the sensor, as well as program instructions for the processor device. Furthermore, the pen may comprise a keypad 11, which enables activation and controlling of the pen. A trans- ceiver 12 for wireless communication, by means of IR- light or radio- waves, with other participants of the system of Fig. 1 is also included. Additionally, a display 13 for showing, for example, registered information can be included. The keypad, the transceiver, and the display are in communication with and controlled by the electronic unit 10. It should be noted that the illustration of Fig. 3 is schematical and that the actual configuration of the parts comprised within the pen may differ from the con- figuration shown without departing from the scope of the present invention. In the above-mentioned embodiment, the position-code pattern is an optical readable pattern and, thus, the sensor is an optical sensor. The position code pattern can be based on another parameter than an optical parameter as mentioned above. In that case, the sensor must, of course, be of such a type that is capable of reading the parameter in question. The combination of a digital pen and a position- coded product can be used as an input device to a computer, a PDA, a mobile phone, or the like. For example, text and sketches written on a position-coded notepad can be transferred via the pen to a computer. Additionally, the combination of a pen and a position-coded product allows for global communication, directly from the product via the pen, by the position code on the product being dedicated for such communication. For example, the information registered by the pen can be transformed into a fax message, an e-mail or an SMS, and can then be sent from the pen to a recipient. Further, the combination of a pen and a position-coded product can be used in e-commerce. For example, the digi- ω ω M to X X in o in in o in Ω 03 φ TJ Ω rt 0 Ω μ- μ- Ti O rr μ- 0 TJ 03 0 hi rt 03 0 0 μ- X μ- SU μ- 0 X 3 ø ϋ μ. tr 03 fi fi Φ fi φ ti φ 0 0 03 φ X X 0 0 SD Φ Φ φ 0 Ω Sϋ 0 Ω rt 3 Φ 0 0- Pi CQ rr Pi 0 0 03 03 Pi Su φ ø P. ft Φ 03 φ X μ- φ Φ Φ 0 Φ μ, TJ tr Ω Φ μ- μ- 03 μ- tr μ- 0 03 3 > fi CQ 03 hi rt SD rt SU tu 0 ø Hi <! 3 ø Φ < 0 rt su Ω μ- 0 Φ rr rt su 0 φ rt CQ SU Φ μ- CQ SD Hi 03 SD CQ Ω 03 0 SU 0 fi tr rt μ- 0 CQ Φ X fi 03 TJ tr ti Φ 0 Hi fi 3 φ Φ ø φ μ- Pi P. - 03 i 0 μ" σi φ hi su TJ Pi μ- fi φ Pi ø Φ μ- Φ 03 φ X :> μ- fi rt ii μ- μ- ø 0 0 fi ø μ- <! > j Hi 0 <! μ- σ tr Pi ø μ- l_J. tr Φ 3 φ TJ tr μ- ø μ- ø 0 0 μ- rt TJ φ μ- Ω ø 0 φ Pi SD μ- fi rt μ- ø Ω fi ti Ω μ- μ- TJ ϋ <! x CQ 03 03 Φ CQ fi μ- ø H-3 CQ φ rt 0 φ 0 X μ- φ μ- 0 rt φ rt φ Φ ø Ω tr rt μ- tr Φ Hi ø φ X μ- Pi Si rt SD Φ Pi ø SD SD φ tr SU CQ μ- Φ X 0 x φ ø Φ φ O tr TJ ti φ X ø Φ rt • 03 fi SD 03 Hi Ω X P. CQ X μ- 3 X μ- ø* μ- 3 3 SD O Ω 03 Φ 0 φ X μ- φ ø Φ Pi μ- 3 03 03 X T 0 Ti μ- P. 0 • SD μ- ID ø • φ ø 3 rt hi SD 3 SU Φ rt • ti hi X Si μ- Φ ø Ω ø σi Φ X Φ Φ 0 rt SD CQ ø Φ Φ φ Φ CQ P. Hi o tr X Pi ø 0 SD Q Φ 03 TJ Hi 3 μ- Hi SD VD Φ hi rt SD Hi φ 0 φ μ- Φ TJ CQ μ- σi X Φ ø CQ hi O hi ■ t-. hi rr ø 03 10 fi 0 Ω 3 3 φ TJ 0 TJ Ti φ 03 H X SU tr 03 0 ti 0 SD SD TJ 3 fi ti μ- TJ rt α> o tr Φ rt SD Pi SD 0 CQ rt μ- TJ Φ ø 1 3 Φ X i 0 μ- - X tr CQ SD rt ø hj Φ fi X X 03 Φ tr i φ Φ hi 03 ^ Ti Φ Φ 0 Ω μ- CQ μ- Φ μ- φ hi Φ Φ X 03 μ- ≤ Su 0 fi rt 0 Φ Φ X X Hi 0 ti rt 03 φ ø rt tr μ- 03 Hi Hi 03 VD 0 ~. X 03 rt 0 Φ Φ • 0 CQ tr Φ TJ ø μ- 0 hi rt CQ Φ Ω • μ- Su Hi μ- hj rt Φ ti SU Ω rt hi 0 0 0 rt 3 0 ø rt ø 3 td μ- 3 ø Φ rt 0 μ- 3 3 Hi 0 tr Φ 0 • xl CQ μ- T μ- SD ø φ tr rt fi 0 rt Hi φ ø 03 ø 0 μ- φ ø Ω CQ Pi 03 •• <- Φ Ti 0 0 Sϋ tr fi rt rt fi Φ 0 X SD Φ tr μ- rr fi 0 Hi Φ μ- SD φ μ- rt 3 03 φ Ω Pi rt ø 0 su ø fi Ω 03 hi CQ 0 Ω rt tr ø * X tr 0 tr 3 hi ø Φ Su 0 SD Φ Φ • SD 0 ø Φ 0 03 ø TJ φ Φ Pi rt Pi 0 0 tr 0 fi 0 Φ ti Pi μ- μ- ø rt Pi 0 Φ Φ Pi -<- I TJ φ 03 t ø 3 μ- • 3 ε μ- μ- ι-3 TJ 03 fi Pi Φ μ- r Φ rt 0 3 φ 3 SD 1 Ω 3 tr SU rr 0 ø TJ tr μ- SD lP hi Φ • tr CQ Φ SU SD Φ CQ μ- fi μ- TJ ø 3 CQ hi Ω 0 0 0 Φ Φ φ ii X CQ Ω Hi ø hi SD 0 SD Φ Hi - rt rt φ 0 SU su SU 0 μ- fi < 3 x 0 - tr 03 φ 0 μ- TJ X Ω SU Pi X φ X φ 0 rt X rt Φ μ- X Hi 3 μ- rt 3 Φ ø •* <! p. SD μ- 0 X σi tr Φ N φ SD ø μ- Su μ- CQ Ω μ- Φ ø 3 < X Φ Su fi φ 3 CQ CQ Ω Ω TJ 3 μ- rt SD Ω CQ SD 0 * X Ω φ φ 0 Φ X SD TJ su 03 03 0 Φ SD CQ φ Ω σi 3 tr 03 SU ø tr 0 X μ- Q rt SD o Φ fi 0 σi 0 0 rt O Pi ø Φ fi Φ 0 to rt 03 Hi 0 μ- X 0 x ϋ H Φ μ- CQ φ 3 Si S O Φ rt 0 3 CO TJ ø μ- 03 3 O SU to Ω rt tr Hi Sϋ 01 rt ø μ- $u 0 H Pi SU rt SD 0 tr SD CQ μ- ω SD CQ Hi 03 tr hj Φ rt φ - Φ φ Φ co t to X X in o σi o in o in TJ 03 hi 0 O Ω Ω tr Φ 03 ι-3 Su CQ tr CQ Φ φ Pi ti SU Φ 0 Sϋ 3 TJ Hi φ rt rt Su μ- Φ 0 Ω fi SD - <! X SU SU X fi rt ø SD Φ rt CQ SD rt Φ o TJ TJ hj O D • *-> SU • . μ- o 03 03 rt SU 0 rt 0 ti tr Si CQ Φ fu SD ii 0 hi Pi μ- Φ N 03 Pi φ 0 Φ Pi X <! rt μ- μ- μ- SD ø ø rr CQ μ- tr 0 μ- 03 rt ø φ <! CQ ø SD hi Φ X 0 ø ø 0 Ω Φ Ti Φ • CQ 0 0 Hi fi SU rr Φ Ω Su 0 x ι-3 μ- rt Pi Pi hi Ω rt rt Ω hj CQ μ- φ < fi fϋ 2! Ω 0 Ω Ω rt CQ 03 0 fi ti μ- 03 O 0 CQ O tr ø S3 O SD SU tr μ- μ- SD Φ rt 03 X μ- Sϋ X tr O hi SU SU SU μ- Φ Hi SU Φ o 03 fi Φ :> Φ Ω 0 3 rt 0 su 0 CQ X Ω 0 SD Ω ø X φ ϋ Pi X X μ- 03 0 rt 0 Φ Φ Pi CQ fi SD Pi fi ø rt 0 Ω TJ 3 φ fi ø P. CQ Ω Ω 0 rt rr rt SU ø fi P- Φ Φ Φ SD 03 0 SU SD μ- fi hi tr ϋ Ti 0 0 ø 03 Φ tr 03 0 0 SU 1 su X Φ 3 Ω X Ω Sϋ Pi SD 0 h X rt 3 03 rt Ω σ X X rt Pi Φ Hi Φ Hi 0 Ω 03 Ω 03 μ- SD 03 rt Φ tr 0 rt SD rt 03 03 Ω tr φ 0 rt tr 0 U SU Su tr 0 μ- TJ Ω 0 hj ø X μ- Φ Si φ φ Φ TJ X SU • rt Φ φ ø 0 Φ fi rt rt Φ Hi tr TJ Φ SD rt 0 fi 3 SU su CQ ø hi Hi 03 fi H μ- 03 ø SD tr ø fi hi μ- Φ Φ - . fi X SU μ- Ii Hi 0 X 0 CQ 0 0 03 μ- 0 03 TI ι-3 Ω 03 rt Φ Φ Pi Φ 03 P. Si Ω Hi Φ P. CQ CQ Ω Pi SD rt X fi su Ti ii 03 Ω Φ O tr μ- Φ 4 α SU 03 SU O 0 03 03 Φ SD μ- Ω μ- φ • <. μ- rt rt μ- Φ 0 rt Φ 0 α μ- r i Su rt Sϋ Φ rt TJ TJ 3 3 X 0 ø Φ . ti 0 X ø Φ 0 0 rt tr μ- CQ fi μ- 03 03 03 rt tr Ω hi μ- Su 0 hj SU μ- Ω ii Φ ø Su ft CQ ø Ω tr Φ <! 03 rt Ω 03 Φ SD μ- φ Ω ø 0 0 X ø ø rt > 0 i 0 hj SD 3 Φ tr CQ ω μ- • hj μ- O ø CQ φ i hj Pi Pi μ- μ- X fi Ω Pi 3 SD rt 03 o 3 rt 03 fi in Φ rt 0 φ 03 Hi rt rt 03 SD su Φ μ- 0 3 3 SU SU SU μ- Ω 0 φ rt 0 μ- Hi SU Φ o O CQ 1-3 su Φ fi 03 rt Ω ø Ω 0 ø rt rt rt ø 0 3 01 SD ø rt 03 S3 0 3 SU TJ Ω Hi tr 0 Pi rt ø T SD φ SD Ω o Q φ 3 3 Φ SU SU <J ii 01 SD CQ SU μ- rt μ- Si ø * ø fi tr μ- 0 0 ø tr 0 ϋ -<. fi Pi fi Φ Pi ø SD μ- 0 0 Φ X 0 0 Si 0 SU rt ø 03 rt φ φ u . CQ Ω Pi rt < <! Hi fi 0 μ- ø ε CQ 03 rt 3 0 TJ X 3 Pi Ω 03 tr X in 3 tr SD X 03 0 Hi U U 01 μ- Φ rt φ SD ø tr Φ 0 μ- oo φ rt Φ o 0 rt TJ Q o μ- •-<- 0 μ- ϋ X X 0 φ Ω μ- CQ ø 4 • x Φ 03 \X (J-* tr Φ 3 03 μ- hi μ- 0 O hj 0 03 Ω σ 0 0 0 ø 3 X O O Φ SD rt 03 φ σ φ 03 Φ 03 03 Ω 0 Pi rt Φ 0 ii 03 rt fd 0 3 Φ Φ fi hi 0 rt ii ι-3 rt φ SU • <! o 03 ø tr Φ μ- TJ φ rt Ω μ- rt μ- tr Su fi Φ • <J CQ Pi 0 tr i μ- CQ Pi rt 0 Pi rt rt ti μ- tr tr Φ rt tr 0 Φ fi φ SU o SU . Pi φ 03 ø CQ Φ td φ 0 03 S3 * - * μ- 03 0 Φ CQ tr Φ ø Φ CQ hi μ- rt SD μ- t ø ι-3 SU X α Φ rt SU φ 3 φ tr 0 rt ø Φ rr rt 0 π rt 03 Hi 0 Ω r 0 03 3 TJ μ- tr ø ι-3 Ω 0 rt TJ 0 SU 0 Pi Hi Φ 03 0 fi SU 03 SU 0 π SU tr Pi fi Φ tr Ω φ to SD TJ μ- Su tr μ- φ fi rt Hi S3 rt Hi X Φ ii su Pi μ- Φ Hi 0 fi rt TJ CQ 0 03 φ su tr X rt <! X rt if-. φ ø μ- tr 0 μ- μ- 03 Φ Ω ø • P Ω fi Φ hj Φ TJ x rt 3 tr SU TJ tr Φ rt Ω rt P. 3 μ- Pi rt 0 0 SD Φ SU hi 0 rt tr rt ø Hi ϋ μ- 0 S3 Φ σ TJ μ- su hi φ tr fi SD tr SU TJ hj TJ 0 Φ 03 0 P. Φ μ- SU Φ tr μ- 3 03 tr o φ Φ ø ø 0 Pi TJ Φ μ- X Φ rt ti SD TJ rt rt hi ø 3 03 CQ ø X Ω Φ hi Φ SD rt μ- Ti 3 ø φ Ω fi l-h SU 0 tr Φ tr μ- Pi Ω Φ 0 Φ TJ Ω Φ SD 03 Hi 03 su CQ Ω fi ø- * Si φ Φ μ- o TJ Hi Pi Ti < X fi SD Ω φ φ 03 fi fi hj Φ 3 X Φ 0 X rt Ω φ TJ tr 0 0 0 μ- ø 03 ø Ω hj φ Sϋ fi Φ φ Ω rt SD fi 03 μ- Pi φ ■ P 0 tr tr fi Ω 03 Pi 03 Hi Ω 03 φ φ fi rr 0 μ- Φ X 0 SD S3 μ- 0 ø μ- 0 hi μ- rt Φ Φ μ- Φ Φ μ- hi fi Φ CQ 03 03 Φ SU Ω • rt rt 0 rt r Hi CQ tr ø ti rr 3 Φ rt μ, 3 Pi μ" Hi 03 03 Si 3 TJ 0 3 Pi fi 03 Φ ø Φ φ tr 0 rt tr fi 0 Φ Φ rt SD 0 tr P. 0 SU φ Φ 03 φ φ 3 φ φ 0 rt μ- 03 • φ φ SD Pi « 3 03 ø rt rt tr 0 CQ Ω rt 3 fi φ φ Hi ø fi rt 0 SD P. rt 0 TJ hi rt μ- SD r 0 Φ Hi φ φ Ω Ω Su φ hi 0 fi 0 rr Hi rt μ- TJ rt SD φ μ- 03 Φ SD TJ SD ø rt ti φ * -<. 0 0 SU ø Φ Ω fi 0 tr 0 rt Φ 0 μ- X ø P. ø rt hi 0 hj Ω SD Φ rt rt 0 0 ø rt ϋ rt Pi ϋ 0 hi φ ø μ- ti TJ ø CQ 03 Ω SD Hi (i O μ- ϋ • P TJ tr su tr φ Hi rt rt SU Φ 3 TJ SD rt 3 Ω rt <! O Φ 0 fi rr o 0 Ω ø Φ ϋ ø fi φ ii Φ SD SU SU Ω μ- φ rt ø tr φ T su D Pi μ- φ ii Pi TJ φ μ- fi 3 Φ SD φ μ- O φ Ω Pi μ- μ- Hi O CQ *~~~ | rr μ- rt Φ fi 0 X X Φ Ω ø μ- rt SU 03 3 03 rt 03 Ω fi Ω 0 μ- tr SU 0- Φ Ω tr • 03 Q rt SU rt rt SU μ- 03 rt μ- 03 ø ø μ- fi tr Φ o Φ Φ CQ 0 3 rt 03 03 Φ P. fi o fi SD φ TJ μ- 0 P. SU X μ- tr 03 Ω φ μ- SD ø Φ Φ hi P. 03 φ Ti su Pi SU X Φ Pi X ø hi rt hi SD μ- 0 3 SU Ω Pi ϋ rt Si 03 rt cQ Sϋ rt rt Pi α TI μ- tr rt 0 μ- μ- rt μ" Pi 0 CQ SU X rt SD Pi su p. tr 03 0 SU μ- φ rt fi tr tr CQ ϊ-d ti 3 *• fi μ- Ω 0 rt SD SU tr X μ- 0 SD Φ Hi ii 03 0 • ϋ φ Φ Φ Φ Φ SD Ω 1 ø tr tr rt Hi 0 ti φ 1 03 Ti rt 1 α 0 ø Ω Ω Ω 1 0 rt SD 3 SD φ SU 0 Hi SU rt rt SU *J fi fi 1 fi 1 0 0 rt SD 1 ϋ 1 " hj 0 SU μ- Φ Φ 0 ø φ 1 1 1 1 1 ) ιo to to X μ> in o in o in o in 0 Ω CQ Pi μ- rt Pi tr Hi Hi 03 Ω tr rr μ- Ω tr TJ H rt SD SD Hi tr μ- ι-3 P. φ 0 Φ SD 0 rt 3 T ϋ 0 μ- ■3 tr SU 0 μ- fi rt O X tr ø μ- X tr ø tr 0 hi fi Φ 03 tr SD ø Hi ø X 03 tr φ rt Φ ti SD TJ Φ rt fi hj 0 SD 0 0 Φ CQ J o Φ Φ φ 0 Φ rt Ω Ω ( Q Φ φ su μ- Su μ- CQ ø SU μ- 03 3 rt Ω Ω — tr Ω ii 0 Sϋ 3 Φ Ω SD ii Φ fi 0 ϋ ø Ω 03 rt ii rt tx 3 rt μ- X X 03 Φ fi TJ rt 0 ø SD 3 3 0 S ti Pi 03 SD μ- _r SU ≤ φ SU φ SD Ω 0 CQ rt Φ ti rt fi 0 rt 03 0 Ω i-3 X SD SD Ω μ- td Hi μ- X ø 3 3 μ- fi *< fi ø tr 03 SU ø 03 μ- Φ Φ 03 SD Φ ø fi tr X μ- rt rt fi rt rt ø O Q 0 cQ rt SU Φ rt X ϋ Pi μ- rt Ω ø X hi μ- Ω Pi a Φ φ ø μ- a μ- tr Ω fi μ- Hi Pi μ- 0 tr rt i 03 o SD SD O S3 μ- ti SD rt rt rr ti Pi O O O 3 ϋ rt SU rt ø Hi SU SU ø Ω 0 rt ø tr Ω 3 ti rt rt μ- Φ rt Φ rt φ SD 0 0 rt 0 a SD SD SD rt tr ti rt 03 0 X Pi u 03 μ- Φ tr Hi 0 0 fi 0 X Φ rt X Ω μ- 0 X 0 Su Φ su rt φ tr U Φ Hi O • Ω Pi rt φ hi ø rt fi μ- tr rt Φ X o SD 0 rt rt Ω tr Hi X Pi 3 hi tr su μ- 0 0 T Ω Φ 03 φ Φ Φ 0 X CQ μ- tr TJ Φ SU ti Ω Φ φ 0 tr rt Ω H Φ rt O Hi 03 3 ii O 0 0 rt Ω fi SD • <. CQ Φ 0 Φ φ 0 0 SD 0 fi Ω X Hi tr 0 IQ 0 CQ 3 SD 0 rt Φ Φ Hi ø Ω 0 0 su 03 ø 03 rt 0 03 0 ø 0 Ω ϋ 0 ii 3 Φ x 0 0 Φ 0 Φ Su su Φ ■ P rt <! X hi ø rt Sϋ SD Φ ti rt hi ϋ fi φ ø • Ω fi 03 0 Φ hj tx μ- 0 ø tr Φ rr Pi a rt rt Ω fi rr Sϋ 0 X μ- tr SD μ- rt o SD rt Ω ?r TJ Φ Φ ø fi φ 03 ι-3 Φ Φ ø tr tr su fi φ μ- Si rt rt X X Ω SD 0 3 ø tr φ Hi ii ϊ^ lP hi 03 μ- CQ tr hi 0 rt Φ P. rt φ μ- a SD <! CQ tr o CQ SD 0 0 rt Ω 0 0 Φ 0 SD 0 ø rt φ Φ Ω TJ fi 0 3 φ fi Sϋ . — ., 3 Ω 0 rt P.. μ- Ti Φ Φ fi 0 SU ii 03 Φ rt hi CQ μ- tr Hi Φ ti rt 03 SD rt 0 03 rt 0 X rt rX hi μ- 0 hj 03 0 ø 3 Φ 0 0 Φ rt φ Φ Φ • Φ tr rt :> tr rt 0 Ω rt ø rt 3 ø CQ 0 0 μ- o 0 03 S3 SU Si fi μ- ø ii rt ø ø fi <! μ- SD Φ tr 03 X μ- φ TJ O 03 Φ rt 0 tr Pi μ- Ω ø rt x rt tr 3 Ω fi h3 μ- 03 rt Ω Φ rt 0 J rt ti TJ μ- 0 tr Φ t rr tx ø 0 rt Ω r CQ μ- tr Φ ^ o P. fi Φ tr 0 μ- 0 rt hi SU CQ tr tr ti μ- hi ø Ω 3 0 Φ Ω hi tr 0 0 tr μ- 03 μ- ii φ a fi μ- ø Ω 0 Φ • r μ- Φ 0 SD rt 0 CQ ti 03 Hi Φ Φ hi Φ tr ø 03 ?r Φ TJ CQ 03 μ- Ω X μ- Ω hi p. rt tr Pi a ø x 03 rt Pi rd 0 < SU Ω Φ Φ rt rt rt Pi X rt H Ω tr 3 0 tr 03 Ω hi rt tr μ- μ- μ- rt Φ ø 0 0 0 μ- 0 S3 Φ Sϋ 0 Hi Pi Φ Ω μ- rt 03 SD ϋ SU 0 φ 0 CQ 0 tr 0 fi SU hj Pi 0 SD 0 μ- rt CQ rt Pi μ- 0 hi SD Φ 0 μ- 0 μ- m K rt ø 4 0 Hi Φ 0 S a 0 ^ 0 Ω CQ μ- D Ω 03 fϋ μ- tr fi SD Hi 03 hi Ω 0 Ω Pi hj fi tr TJ rt rt μ- SU μ- ti X 0 03 hi 0 SD μ- rt Hi φ rt φ Ω tx ø tr rt O SU hi rt in μ- tr O Ω ø μ- o φ rt o 0 a Ω μ- ø rt h SD μ- p. tr μ- 03 Φ Φ 3 03 Φ 0 SU φ ø Ω Φ ø 3 03 Hi Ω Hi 0 03 03 Hi Ω SD SD J φ SD Φ Si X rt 03 rt 0 fi μ- 03 0 to rt 3 Ω Φ 0 3 ø Ti tr rt ø > 03 0 SD ø μ- Φ SU rt μ- φ fi rt rt Hi rt Ω φ Φ 3 t fi 0 ii X ø TJ Φ Ω rt fi 0 0 rt fi S3 μ- tr μ- tr 0 Pi 0 0 Φ 0 tr rt 3 ø ε Ω ø tr φ Ω rt X ti hi tr rr Sϋ -6 μ- rt Hi φ 0 Ω tr μ- μ- SU Φ 3 SD φ ^ - ^ Ω ø 0 CQ rt ø su • <! tr O μ- rt 9 X tr 3 ø X ø- rt μ- fi hi Φ ø rt rr TJ X Ω hi tr S3 SD SD rt rt Φ Φ 0 φ φ fi φ *< μ- hj Φ 3 CQ tr μ- φ 0 X tr μ- t fi rt rt 0 Ω 03 TJ O tr a X rt ø fi μ- S3 X 0 Pi X rt Ω 03 0 hi 0 03 φ Ti 0 ø 03 X TJ 0 0 Pi ø Φ Pi tr Φ 0 rt μ- X rt > 03 3 SD CQ 0 < rt μ- Ω r Ω tr μ- ω ø O Φ CQ Φ rt 0 td SD • Hi Φ 03 rt μ- 0 0 tr hi μ- hj Ω Φ μ- tx Sϋ ■ -<. ø Ω ø 03 O 0 a en IQ ø TJ ø TJ 0 0 Ω Φ < 3 tr Φ \X fi ø TJ CQ 03 fi ø tr μ- μ- φ ø hi H rt rt hi 03 hi ø Φ Ti Φ X <! CQ rt TJ rt rt 0 rt Hi μ- SD ϊ^ ø TS φ . μ- rt tr μ- φ tr CQ ϋ rr Ω rt φ μ- μ- t 0 X tr rr SD rt tr hi rt μ- tr ø ø* Φ 0 Hi 0 tx 03 Φ φ rt μ- 0 ø X μ- * -<. Φ tr rt rr Φ Φ tr ^ 03 Φ Ω φ SD 03 0 Φ S3 μ- Φ Φ Hi X 0 0 rt 0 Ω 0 ø rt φ μ- μ- Ω ■ P SD X tr ti ti hj rt tr TJ hi ø • fi Φ rt ti 0 0 03 X Ω tr rt SU Ω 0 tr rt 0 tt 0 μ- SD Φ 0 fi Hi fi φ ϋ ø IX tr φ tr rt X 0 su Φ Φ Ω Ω P. ø o 0 Φ su • o hj μ- P. 0 fi rr fi X Φ rt φ Pi ø X 0 SD * tr 3 μ- a rt SD ; r X Ω hi μ- TJ Φ 0 Φ Hi hi Φ μ- Ω 0 0 Sϋ *< SD X CQ rt rt Φ • μ- r Φ fi Φ Hi rt rt Pi fi Su X ø tr Ω φ Ω Ω rt φ φ X rt 0 Sϋ rt φ 0 ϋ X • <: CQ μ- SU tr φ μ- rt μ- rt S3 rt Q SD tx X μ- tx μ- SD - . rt -<. μ- Hi ø tr . 0 tr 03 ø X 0 Φ • Ω Φ tr <! tr μ- rt 1 Φ Hi 03 0 3 0 μ- 0 Φ Φ 1 1 S3 SU 3 Φ φ φ ø ϋ φ fi SD 03 Hi P. x 1 ϋ 1 0 10 to to X X o in o in o in μ- Hi rt Ω X rt Hi ι-3 fi rt rt 0 CQ rt CQ Φ Pi Pi ϋ Hi rt μ- SU tr 0 t ø ø μ- tr SD tr 0 tr SD tr tr Hi 0 0 r 03 SD SD SD 0 tr ø 03 X tr μ- 0 Φ Φ rt Sϋ φ 0 Φ rt Φ Φ hi Φ CQ rt rt rt 0 Φ 0 rr cQ rt rt X Φ ø hj SD rt μ- SU TJ φ SD SD SD H SU Φ Ω SU 03 Φ SU Pi 3 Pi fi 3 fi Pi μ- tr rt i 3 Ω μ- tx μ- i tr 03 SD 0 Φ Φ tr SD S! ø Φ tr 03 in H tr tr tr CQ 0 Ω rt 03 ø in X X S3 t CQ X Ω X rt μ- Ti 3 Φ ω fu tr X X X 0 03 0 tr Φ μ- rt φ μ- μ- μ- rt Φ 0 0 SD rt ø Pi CQ Ω o Ω Φ 0 0 0 tr rt fi φ ϋ fi tr ø 3 rt μ- 3 fi Ω tr rr SD O Ω ø Ω Ω a 03 fi fi s; CQ 01 SU X Ω ø tr ø T! φ P. X Hi rt Pi 0 rt o tx tx X φ TJ su tr Su rt rt • X 3 Ω fi ø 03 μ- TJ Pi SD φ Pi tr ti CQ Λ hi ø su Φ rr 0 > X Φ rt H Φ su SD Hi Φ fi fu w 0 φ Ω ϋ rt Pi ø Hi 01 SD to X ti rt Hi μ- 3 μ- rt H to Ti Φ Hi Φ tx Φ 03 Sϋ > tr Φ ι-3 rt P. Φ fi Pi rt SD μ- 0 SU μ- ø to ø 0 Φ Φ μ- rt rt Φ P. tr tr Φ fi φ SD CQ μ- Φ Φ rt rt ti S3 ø Φ ι-3 ø CQ 03 • fi Φ φ hj φ hj Ω tr X tr Ti rt SD rt hi μ- T! 03 SU Hi SD tr μ- rt Φ SD 03 φ S3 ø X Si SU φ ø rt Φ 0 tr fi Φ rt Pi φ rt 0 0 ø Ω 3 tr P. Ω tr μ- X 0 03 3 rt 0 TJ ϋ Φ SU Pi tr su su > Φ fi X • -<- μ- Φ tr 0 03 rt SU Ω Ω su fi rt rt Ω > TJ X Φ rt Ω ø Φ S3 tr tr hi tx μ- - . rt P. SD oi rt 3 SD φ rt SU tr o -J 0 tr X μ- 03 s Φ ø 0 μ- ø Ω μ- Sϋ to tr 0 3 tr in to S3 Φ X 3 0 fj * X S3 ø hj X Ω X Ω rr Hi o Φ hi fi 0 * Φ tr Pi 0 X μ- Ω ø 3 0 Φ 03 0 Φ to x X SU SU μ- Φ Φ o X SU Hi o Ω ø tx 3 fi 3 Ω SD Hi ø a X ti μ- Ω Pi fi 0 rt 0 CQ Φ 03 0 μ- φ tr TJ Φ fi t 03 rt ø 0 μ- Φ Ω Su Ti li tr Hi 3 ø Φ ti tx ii hi Φ ti SU X rt tr rt Φ hi 3 03 tx X rt ti Pi μ- SD φ rt 3 μ- Φ φ Φ P. φ X 0 φ Φ <! Pi φ Ω tr CQ tr Φ Φ Pi Hi ø tr ø SD 0 0 03 0 CQ Ω 3 fi φ 03 ø fi w X Φ 03 SD rt Si fi rt hj rt hi Ω TJ μ- fi 0 X Sϋ tx 3 fi rt μ- O 0 TJ 0 rt μ- μ- φ μ- fi φ Φ ø fi hi 03 rt φ Φ * -<- SD T5 Ω Φ- 03 0 h ω SD ø rt CQ TJ Ω rt SD Ω Φ μ- tr ■ -< fi hi 0 rt 0 tx Φ 0 μ- CQ tr tr rt hj SD 0 rt rr rt rt ii rt H Φ μ- 03 Φ Hi μ- ii £! fi J tr Φ rt tr Φ X SU 0 μ- tr μ- tr to 3 Pi SD Φ 0 μ- μ- ø 03 rt X 03 ø Φ 03 X rt <! Φ ø 3 fu SD rt Ω 0 rt 0 SU 03 03 Φ μ- 0 Ω Hi Φ Φ tr tr <τ_ Φ Q SU rt rt Φ 0 hi tr 0 0 rr 0 Ω tr μ- 03 Hi 0 Φ X μ- X tx hi μ- SD 0 CQ Φ SU Pi 0 Ω 0 ø tx Φ φ 03 μ- rt SD 0 CQ * -<: φ O 3 Φ Ω fi SU tr μ- φ hi Φ 3 X Φ μ- 03 03 Ω • - • <- fi tr SU tr SD 0 TJ o ø rt CQ 03 S3 w φ Pi X ø tr tx Φ Ti X X rt P. μ- hi <! Ti Φ SD 0 rt μ- to rt Pi CQ tr X 01 fi CQ hi 0 SD SU N Φ Φ t 0 μ- tr 03 0 Hi ^ Su tr 3 0 SU Ω rt φ 03 • ø hi 0 Hi Φ r rt 3 μ- TJ tr μ- Hi ø Φ SD X rt ϋd rt μ- u Ω X X tr SU Pi φ μ- N Pi 03 P. μ- φ μ- rt SU Hl rt Φ CQ 03 X 0 fi ø φ SU Φ> μ. rt μ- Hi ø ϋ 03 0 0 tr rt tr 03 0 0 tr μ- rt Ω SU Φ Pi rt in Φ 03 tr Ω μ- Pi SD CQ ϋ Φ tr μ- Φ CQ fi S Ω X ø Ω rt Pi SU o Hi tr Φ SD φ μ- rt i X ø 3 Φ μ- to tx o μ- O fi ) μ- Φ o rt X Ω SD μ- TJ SU o o Q SU fi rt 03 Ω su ø fi O ø fi 0 fi S3 Pi Φ Si SD <i fi 0 ii Ω rt tr SD X <! Pi tr fi rt Φ Hi Φ ø SD fi CQ r Hi μ- 0 fi tx TJ μ- SU 3 ii SD 03 Φ μ- X 0 Ω rt ø φ μ- Ω μ- Φ ϋ Ω Ω Φ fi X μ- ø ø 0 X 0 * x| Ω tr SU $, μ- Pi φ Φ Φ 0 ii w 0 su Ω φ CQ ø rr CQ Ω fu fi fi μ- φ Φ μ- ø x Pi TJ o Ω μ- 0 (U Ti CQ μ- t tr Sϋ Pi CQ X rt P. :> fi ø ø O Φ fi ø ϋ μ- SU X 0 rt Φ rt 03 • rt 0 tr μ- μ- μ- ϋ rt Hi SU Pi su fi fi 0 0 Φ 0 0 H X SD 0 S3 1 rt ø Φ 0 ø X μ- Ω TJ X t φ Φ. . tr H rt P. fi 1 ø fu 1 ø φ Pi 0 0 Φ CQ rt rt In Fig. 7A, the order of the data fields within the key data block after the cyclic shifting has been performed is shown. The data fields of the first data record, record A, retain their positions, the data fields within the second record, record B, are shifted three positions to the right, the fields within the third record, record C, are shifted two positions to the right, and the fields within the fourth record, record D, are shifted one position to the right . The data block output as a result of the reordering algorithm for a key data block is referred to as reordered key data block, RKB. In table 2, the cyclic shifting scheme of the data fields included in the input data block IB is shown. Table 2 In Fig. 7B, there is shown the order of the data fields within the input data block after the cyclic shifting, to the right, has been performed. The data fields within the first data record, record A, are shifted one position, the data fields within the second data record, record B, are shifted two positions, the data fields within the third data record, record C, are shifted three positions, and the data fields within the fourth data record, record D, retain their positions. The data block output as a result of the reordering algorithm for an input data block is referred to as reordered input data block, RIB. It should be noted that a wide variety of shifting algorithms may be used within the scope of the present invention to obtain reordered or rearranged key and input O ω to to X X in o in 0 in O in ber calculation, the thus calculated random seed is used as input data for calculation of the random numbers to be used in the encryption algorithm. Data blocks that include a subset of the sequence of data records containing the processed optical data form the input data in the seed update part . The data records comprise data fields, preferably organized as is described above in relation to the first preferred embodiment. Thus, each data record includes four data fields, the first two including the sum value, the third the minimum value, and the fourth the maximum value, see Fig. 6. At step 810, each data block is processed in a first hash function, which in this embodiment is an encryption algorithm, in order to increase the randomness of the data records containing the processed optical data. The first hash function is, in this embodiment, a symmetrical encryption algorithm. The data records containing the processed optical data are used as the encryption key, and an arbitrarily chosen vector is used as the initiation vector. However, it is preferred that the number of ones and zeros are substantially equal and appropriately distributed throughout the initiation vector. This can be achieved by using the previous seed as the initiation vector for the hashing algorithm, which will remove the risk of patterns that may be produced due to frequent seed updates with substantially similar input data, and will improve the quality of the random seed. Then, at step 820, an iterative process concatenates each hashing output or hash value, HV, and thereby forms hashing output data blocks. This is due to the fact that a hashing process normally results in an output having a data size that is less, or much less, than the data size of the input data. The number of iterations is dependent on the desired size of the output data. The output data blocks are then divided into key data blocks and seed data blocks at step 830. The key data blocks and seed data blocks are used as input data in the random number calculation part. This can mathematically be written as Input data: optical data = SU 2*m -ι • ■ SUιSU 0 Calculation: SI X = Hash n (SI x , SU X ) Output data: seed input = Sl2 * -ι • . SIiSIo = SKm-i . . SKιSK 0 SD m -ι . . SDιSD 0 key data = SKm-1.. SKiSKo seed data = SD m _!..SDιSD 0 where = Y/n, Y is the bit-length of the random number to be generated in the second step, and n is the bit- length of the output data of the hashing algorithm, Hash. Furthermore, SU X is input data block x, SI X is output data block x, SK X is key data block x and SD X seed data block x. In this embodiment, the hashing algorithm is performed using a symmetric encryption algorithm, AES. As realized by the person skilled in the art, there are a significant number of conceivable algorithms that can be used to obtain an increased randomness and that can be implemented instead of the AES algorithm. The seed update can be performed with a full update of the seed, i.e. with all data blocks included in SI, or with one data block, SI X . This is dependent on the requirements of the random number calculation algorithm in part two and the computer power at hand. Then, at step 840, in the random number calculation part, the key data blocks and seed data blocks are used as input data in a second algorithm, which in this embodiment utilizes a symmetrical encryption algorithm, for example AES. The algorithm performed at step 840 is an iterative algorithm. As mentioned above, there are a number of alternative encryption algorithms that can be used in said second algorithm instead of AES, for example IDEA or DES . Alternatively, A3 or A5, which are stream ciphers and are used for symmetrical encryption, may be used. A counter, seed count, is also included. It counts the number of times the random number calculation was used since the input data were updated in the seed update. Mathematically, the random number calculation can be written as Input data: key data = SKm-i .. SKιSK 0 seed data = SD m _ι..SD x SDo seed count Calculation For x from 0 to (m-1) 1.1 PR X = Encrypt (key=SK X , input=SD x ) 1 . 2 SK( x+ ) mo d m = SK( x+ 2)mod XOr PR x 1.3 SD( X+ i) mo d m = SD( x+ ι) mθ d m xor PR X seed count = seed count + 1 Output data: random number = PR m -ι ■ • PRiPRo key data = SK m _ι .. SK X SK 0 seed data = SD m _ι..SDιSD 0 seed count where PR X is a random number data block x, xor is an XOR operation, mod is a modulus operation, and encrypt is a symmetric encryption algorithm. Also, a block transformation is performed in the calculation step. This transformation further increases the randomness of the random numbers. The transformation of steps 1.2 and 1.3 could be made in a number of other ways, but the described method ensures that all changes in a block is transformed through out most of the random seed, and thereby ensures a high quality random seed for the following calculation. According to an alternative embodiment, the second algorithm is a hash function, preferably using the same symmetrical encryption algorithm as in the second algorithm described above . Finally, at step 850, the method is returned to the procedure shown in Fig. 4 at step 460, where the actual encryption of the message is performed using, in this tSJ to X X in o in o CJ1 o ■ Q 0 rt μ- 0 TJ 0 Hi rt CQ μ- TJ Pi 3 hi TJ ii Hi ø Hi μ- 3 Hi i u fi μ- Ω ø X φ φ μ- fi Sϋ φ 0 TJ Φ ti o <! ti μ- 03 CQ Ω μ- 0 rt ø rt 0 X Φ 03 * -<. 3 φ μ- rt Hi Ω 03 < ϋ tr r tr φ Φ tr tr μ- fi φ SU 0 φ X Φ μ- 3 ø * ø 03 rt SD Φ Φ Ω μ- CQ 0 rt 3 03 φ 0 rt t tr 0 fi fu tr X Φ Ω Φ SD TJ ø fi μ- Φ Si su rr φ rt . ϋ ø TJ hi μ- rt μ- μ- X \ 3 fi μ- P. tr TJ r φ X 03 0 SU rt 0 0 a Φ 0 ø SD 3 ø 0 φ tr Hi rr rt φ <! Ω ti tr ø rr Ω ^ 0 Φ Φ Φ μ- ø φ μ- 0 rt Φ CQ μ- fi Φ P. fi 0 0 rt ø ø Ti Φ tr tr hi tr O φ Ti hi . ø 03 rt φ ■ P Φ SU μ- φ ø a hi Pi fi Φ Φ 03 μ- rt ø rt rt μ- CQ rt Pi Φ Pi P. 0 tr 0 μ- 03 ø TJ SU μ- SD Ω CQ μ- ø φ Hi <1 0 rt μ- φ μ> o rt X φ Φ rt 0 ø SD tr tr 03 Hi Ω IQ 0 SD SU ø ε 0 fi Ω Ω su rt X 03 Φ 0 μ- 0 μ- rt ø 1 X 0 ii tr φ rt 0 fi Hι ti tx SD 3 0 Ω Ω 0 0 rt Φ ø μ- 03 0 μ- μ- Φ 0 03 μ- Pi 0 O Pi X rt rt TJ Pi TJ Ω rt ^ fi 0 μ- <! ε μ- Pi S3 TJ ø φ Φ ø tr SU < 3 Φ u ø μ- fi μ- rt Ω fi ii Φ 3 0 0 Φ φ hj μ- CQ tr X Φ 3 Φ μ- 03 TJ 3 S3 03 ϋ ø ø 0 Φ X 03 TJ fi Hi rt 0 u Hi tr Φ rt rr SD SD <! Φ X μ- 0 03 0 0 μ- 03 Φ μ- CQ 0 rt SD μ- ϋ ø φ Hi Ω 0 Φ Pi fi Ω lP O * -< μ- hi 3 φ rt 3 O Pi 03 μ- tr rt 0 ø fi 0 μ- TJ su φ fi φ 3 Pi tr μ- μ- Sϋ ø O X Si μ- ø ε tr 0 Φ Φ rt φ <! μ- 03 Pi 03 ø φ μ- ø rt fu ø- "< Hi ø Ω tr SU 03 Ω Sϋ 03 3 X < SD 0 rt fi Φ fi X ø TJ rt Φ Φ rt :> Si rt μ- 03 a ø φ φ fi 03 rt tr tr ø ø μ- μ- μ- tr X 03 ø φ 03 Sϋ Φ SD rt SD rt 0 Pi 3 0 X tr rt μ- 0 rt Hi Φ rr fi ti Φ Ti μ- ø φ Φ CQ ø su μ- CQ X 03 μ- ϋ μ- Φ fi fi TJ O 03 ø φ 03 < 0 rt ø 0 0 S3 ti 0 <! rt rt Φ 0 ø μ- rr φ tr 0 Hi SD μ- Φ S3 U 03 0 hj CQ 0 tr fi Φ 03 • fi ø Ω μ- ti Hi SU tr 0 Φ CQ Φ fi Φ μ- H rt μ- 03 rt Φ Hi Si hi tr Φ 0 ι-3 SD SD tr tr φ tr 0 μ- Φ tr φ - . μ- fi tr SD rt 0 0 rr 0 ti 0 ø rt μ- SD 0 ø μ- 0 S3 φ 03 0 ■ <; S3 Pi 0 tr ø 03 Hi r <! 03 fi μ- Φ rt ø μ- 03 Φ tr tr SD i rt o ø su tr su φ Ω ii SD CQ φ tr 0 Pi Hi SU SU ø 0 ti ø < 0 μ- TJ 0 SD Hi Φ ø ti Si S3 φ su s; ø SU Ti Hi rt T SU fi • -< ø Ω SD X 0 03 rt X rt SD 0 SU X Φ φ 03 0 hi Φ μ- μ- s; fi rt fi fi rr Pi 03 X Su μ- φ fi 1 0 Ω Sϋ μ- tr fi rt φ Φ tx Φ ø <! 3 μ- 0 SD ii φ φ μ- μ- hi 1 μ- 3 ϋ Φ 3 su ø 03 1 Φ rt ø ø X 1 fi φ 03 Q *< CQ SU X rt CQ 1 1 SU

Claims: CLAIMS 1. A method for encrypting a message for secure transmission of said message from a sending device to a receiver, comprising the steps of obtaining optical data, generating an encryption key using said optical data as random seed, and encrypting said message using said encryption key in an encryption algorithm. 2. The method according to claim 1, wherein the step of obtaining said optical data comprises the step of obtaining said optical data using an optical sensor, said optical data representing values of an optical pa- rameter readable by said optical sensor. 3. The method according to claim 2, wherein said optical parameter is brightness sensed by said optical sensor. 4. The method according to claim 2 or 3 , wherein the step of obtaining optical data comprises the step of obtaining said optical data from a portion of a surface provided with a position code pattern, wherein said position code pattern includes optical readable markings, and wherein said optical parameter is representative of said portion. 5. The method according to any one of claims 2-4, wherein the step of generating an encryption key comprises the steps of processing said optical data according to a prede- termined scheme, organizing said processed optical data in data fields, wherein each data field has a predetermined size, and organizing said data fields in a predetermined order in data records. 6. The method according to claim 5 , wherein the step of processing said optical data comprises the step of calculating statistical properties of sets of said optical parameter values represented by said optical data, whereby said statistical properties constitute said processed optical data. 7. The method according to claim 6, wherein said statistical properties comprise a maximum value, a minimum value and a sum value of said set of optical parameter values, and wherein the step of processing said optical data comprises the steps of organizing said maximum value in at least one maximum data field, said minimum value in at least one minimum data field, and said sum value in at least one sum data field, and organizing said maximum, minimum, and sum data fields in a data record according to said predetermined order. 8. The method according to any one of claims 5-7, wherein the step of processing said optical data comprises the steps of rearranging the order of said data fields within at least one data record of a first series of data records according to a first reordering algorithm, thereby obtaining a first series of rearranged data records, and rearranging the order of said data fields within at least one data record of a second series of data records according to a second reordering algorithm, thereby obtaining a second series of rearranged data records . 9. The method according to claim 8, wherein an encryption key comprises key data and input data, and wherein the step of generating an encryption key comprises the steps of using said first series of rearranged data records as said key data, and using said second series of rearranged data records as said input data. 10. The method according to any one of claims 5-7, wherein the step of generating an encryption key comprises the steps of processing a set of a predetermined number of said data records in a first step using a first hash function, thereby obtaining a first output, processing said first output in a second step using an iterative algorithm, thereby obtaining a second output , and using said second output as said encryption key or for generating said encryption key. 11. The method according to claim 10, wherein, in said second step, said first output is processed using a second hash function. 12. The method according to claim 10 or 11, wherein in said first and second steps, a first and a second symmetrical encryption algorithm, respectively, is used. 13. The method according to claim 12, wherein one symmetrical encryption algorithm is used both as said first and as said second symmetrical encryption algorithms . 14. The method according to claim 13 , wherein one symmetrical encryption algorithm is used both as said encryption algorithm for performing said step of encrypting said message, and as said first and said second symmetrical encryption algorithms. 15. The method according to any one of the preceding claims, wherein the encryption key comprises key data and input data, the method further comprising the steps of using a first subset of said optical data for generating said key data, and using a second subset of said optical data for generating said input data. 16. The method according to any one of the preceding claims, wherein said encryption algorithm for encrypting said message is a symmetric encryption algorithm. 17. The method according to claim 1, further comprising the steps of obtaining pressure data using pressure sensing means, wherein the step of generating an encryption key comprises the step of generating an encryption key using said pressure data in combination with said optical data as random seed. 18. The method according to claim 1, further com- prising the steps of obtaining time data, wherein the step of generating an encryption key comprises the step of generating an encryption key using said time data in combination with said optical data as random seed. 19. The method according to any one of the preceding claims, wherein said steps are performed in a digital pen comprising an optical sensor and said sending device. 20. Computer readable medium comprising instructions for bringing a computer to perform a method according to any one of the preceding claims. 21. Device for encrypting a message for secure wireless transmission of said message from a sender to a receiver, comprising receiving means for receiving optical data, said op- tical data representing values of an optical parameter, processing means for generating an encryption key using said optical data as random seed, and encryption means for encrypting the message to be transmitted using said encryption key. 22. Device according to claim 21, wherein said optical data has been obtained from a portion of a surface provided with a position code pattern having optical readable markings. 23. Device according to claim 21 or 22, wherein said processing means is further arranged to processing said optical data according to a predetermined scheme, organizing said processed optical data in data fields, wherein each data field has a predetermined size, and organizing said data fields in a predetermined order in data records. 24. Device according to claim 23, wherein said processing means is further arranged to calculate statistical properties of sets of said optical parameter values represented by said optical data, whereby said statistical properties constitute said processed optical data. 25. Device according to claim 24, wherein said properties comprise a maximum value, a minimum value and a sum value of said set of optical parameter values, and wherein said processing means is further arranged to organize said maximum value in at least one maximum data field, said minimum value in at least one minimum data field, and said sum value in at least one sum data field, and organize said maximum, minimum, and sum data fields in a data record according to said predetermined order. 26. Device according to any one of claims 23-25, wherein said processing means is further arranged to rearrange the order of said data fields within at least one data record of a first series of data records according to a first reordering algorithm, thereby obtaining a first series of rearranged data records, and rearrange the order of said data fields within at least one data record of a second series of data records according to a second reordering algorithm, thereby ob- taining a second series of rearranged data records. 27. Device according to claim 26, wherein an encryption key comprises key data and input data, and wherein the processing means is further arranged to use said first series of rearranged data records as said key data, and use said second series of rearranged data records as said input data. 28. The device according to any one of claims 23-25, wherein the processing means is further arranged to process a set of a predetermined number of said data records in a first step using a first hash function, thereby obtaining a first output, process said first output in a second step using an iterative algorithm, thereby obtaining a second output, and use said second output as said encryption key or for generating said encryption key. 29. The device according to claim 28, wherein said processing means is further arranged to use a second hash function for processing said first output in said second step. 30. The device according to claim 28 or 29, wherein in said first and second steps, a first and a second symmetrical encryption algorithm, respectively, is used. 31. The device according to claim 30, wherein the processing means is further arranged to use one symmetri- cal encryption algorithm both as said first and as said second symmetrical encryption algorithms . 32. The device according to claim 30, wherein the processing means is further arranged to use one symmetrical encryption algorithm both as said encryption algo- rithm for performing said step of encrypting said message, as said first and as said second symmetrical encryption algorithms. 33. Device according to any one of claims 21-32, wherein said encryption means is further arranged to en- crypt said message using a symmetric encryption algorithm. 34. Device according to any one of claims 21-33, wherein said encryption means is further arranged to use a subset of said optical data as key data for said encryption algorithm, and use a second subset of said optical data as input data for said encryption algorithm. 35. Device according to claim 21, wherein said receiving means is further arranged for receiving pressure data, and wherein said processing means is arranged to generate said encryption key using said pressure data in combination with said optical data. 36. Device according to claim 21, wherein said processing means is further arranged to obtain time data, and to generate an encryption key using said time data in combination with said optical data. 37. A sending device arranged for obtaining a message and for sending said message to a receiver, comprising an optical sensor for obtaining optical data, a device as claimed in any one of claims 20-34 for encrypting said message prior to transmission thereof, and transmitting means for transmitting said message. 38. The sending device according to claim 37, wherein the sending device is a digital pen device. 39. An information management system comprising a plurality of products (P) provided with a position code pattern, a plurality of digital pens (DP) capable of reading said position code, and a server means (ALS) communicating with said digital pens (DP) in at least one communication network, said server means (ALS) including a position data base (GSDB) which associates positions coded by said position code (PC) with rules for information management, wherein said digital pens (DP) are arranged to communicate to said server means (ALS) informa- tion which is registered on said products (P) in the form of at least one position which is coded by said position code, wherein each digital pen comprises a device as claimed in any one of claims 21-36. 40. A method for authentication of a sent message, wherein said message is sent from a sender to a receiver, comprising the steps of obtaining optical data, using said optical data for generating random number data, encrypting said random number data, and using said encrypted random number data for authentication of said message .

Inventors: DORE HANSEN MADS, EDSOE TOMAS, SKANTZE KRISTOFER, THUVESHOLMEN MIKAEL, DORE HANSEN, MADS, EDSOE, TOMAS, SKANTZE, KRISTOFER, THUVESHOLMEN, MIKAEL
Applicants: ANOTO AB, DORE HANSEN MADS, EDSOE TOMAS, SKANTZE KRISTOFER, THUVESHOLMEN MIKAEL, DORE HANSEN, MADS, EDSOE, TOMAS, SKANTZE, KRISTOFER, THUVESHOLMEN, MIKAEL
Application year: 2001
Main classification: G06F7
IPC codes: G06F7, H04L9