Research Article
Data Authentication for Wireless Sensor Networks with High Detection Efficiency Based on Reversible Watermarking
Algorithm 1
Localizing synchronization points
| 1. i⟵1 | | 2. groupflag ⟵0 | | 3. while (Stream S is not over) do | | 4. if ((m/2 < i <3m/2 && md5(Si) % m ==0 && groupflag ==0)||i ==3m/2) | | 5. spflag ⟵0//Si is the synchronization point of generator group; | | 6. i ⟵0 | | 7. groupflag ⟵1 | | 8. else if ((m/2 < i <3m/2 && md5(Si) % m ==0 && groupflag ==1)||i ==3m/2) | | 9. spflag ⟵ 1//Si is the synchronization point of carrier group; | | 10. i ⟵0 | | 11. groupflag ⟵0 | | 12. end if | | 13. i ⟵ i+1 | | 14. end while |
|