Kate has shared her pride in her grandmother Valerie Glassborow, who was a codebreaker during the Second World War and helped decipher enemy messages.
The Duchess of Cambridge has written the foreword for The GCHQ Puzzle Book, the first ever puzzle book launched by the Queen's Government Communications Headquarters.
In it Kate wrote: "I have always been immensely proud of my grandmother, Valerie Glassborow, who worked at Bletchley Park during the Second World War. She and her twin sister, Mary, served with thousands of other young women as part of the great Allied effort to break enemy codes.
Kate's grandmother was a codebreaker during the Second World War
"They hardly ever talked about their wartime service, but we now know just how important the men and women of Bletchley Park were, as they tackled some of the hardest problems facing the country."
Kate, 34, added that their successors at GCHQ continue this intellectual tradition, and have become well known for valuing and understanding the importance of mental wellbeing. "This is so important when dealing with such discretion and the pressure which comes with this," she wrote.
The Duchess has written the foreword for The GCHQ Puzzle Book
All proceeds from the book, which is on sale next Thursday, will be donated to Heads Together. The campaign spearheaded by Prince William, Kate and Prince Harry aims to tackle stigma, raise awareness and provide vital help for people with mental health challenges.
"William, Harry and I are very grateful that this book is supporting our Heads Together Campaign," Kate added. "I hope it will not only amuse and challenge readers, but help to promote an open discussion of mental health problems, which can affect anyone, regardless of age or background.
All proceeds from the book will be donated to the royal trio's campaign Heads Together
"Together, we are aiming to change the national conversation around mental health from stigma and fear to openness and understanding."
The royal trio launched the campaign earlier this year. A number of their engagements have focused on the important of mental health; just earlier this week William, Kate and Harry delivered a joint speech at County Hall in London to mark World Mental Health Day.